aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vim/vimrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index d95b0f6..3e19297 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -20,6 +20,7 @@ NeoBundle 'Shougo/unite.vim'
NeoBundle 'mattn/emmet-vim'
NeoBundle 'miekg/rfc'
NeoBundle 'tommcdo/vim-exchange'
+NeoBundle 'scrooloose/syntastic'
call neobundle#end()
@@ -94,6 +95,15 @@ autocmd BufWinLeave * call clearmatches()
highlight Comment cterm=italic
+" Use clang_check for syntax checking
+let g:syntastic_c_checkers = ['clang_check']
+
+let g:syntastic_always_populate_loc_list = 1
+let g:syntastic_auto_loc_list = 1
+let g:syntastic_check_on_open = 1
+let g:syntastic_check_on_wq = 0
+
+
"" Statusline
set statusline=
@@ -109,6 +119,13 @@ set statusline+=%#identifier#
set statusline+=%r
set statusline+=%*
+" Show syntastic warnings
+if neobundle#is_sourced('syntastic')
+ set statusline+=%#warningmsg#
+ set statusline+=%{SyntasticStatuslineFlag()}
+ set statusline+=%*
+endif
+
" Show a warning if file format isn’t unix
set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}