From 91707a3b18baaa73a578389ac3e0db64ece538c0 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sun, 19 Apr 2015 05:29:03 +0200 Subject: vim: Add syntastic and clang_check --- vim/vimrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'vim') 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.']':''} -- cgit v1.2.3-54-g00ecf