diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2015-04-19 05:29:03 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2015-04-19 05:29:03 +0200 |
commit | 91707a3b18baaa73a578389ac3e0db64ece538c0 (patch) | |
tree | 8bb928be324e5732f5f3033e3cdb40c001ad9c96 /vim | |
parent | 1af8894941b4c97df7aeca6afc03bac066235686 (diff) | |
download | dotfiles-91707a3b18baaa73a578389ac3e0db64ece538c0.tar.xz |
vim: Add syntastic and clang_check
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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.']':''} |