aboutsummaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-04-19 05:29:03 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2015-04-19 05:29:03 +0200
commit91707a3b18baaa73a578389ac3e0db64ece538c0 (patch)
tree8bb928be324e5732f5f3033e3cdb40c001ad9c96 /vim
parent1af8894941b4c97df7aeca6afc03bac066235686 (diff)
downloaddotfiles-91707a3b18baaa73a578389ac3e0db64ece538c0.tar.xz
vim: Add syntastic and clang_check
Diffstat (limited to 'vim')
-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.']':''}