diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 36468fbd..e069f750 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -77,6 +77,10 @@ if !has_key(g:syntastic_mode_map, "passive_filetypes") let g:syntastic_mode_map['passive_filetypes'] = [] endif +if !exists("g:syntastic_check_on_open") + let g:syntastic_check_on_open = 0 +endif + command! SyntasticToggleMode call s:ToggleMode() command! SyntasticCheck call s:UpdateErrors(0) redraw! command! Errors call s:ShowLocList() @@ -89,7 +93,7 @@ augroup syntastic autocmd cursormoved * call s:EchoCurrentError() endif - autocmd BufReadPost * if exists('g:syntastic_check_on_open') && g:syntastic_check_on_open != 0 | call s:UpdateErrors(1) | endif + autocmd BufReadPost * if g:syntastic_check_on_open | call s:UpdateErrors(1) | endif autocmd BufWritePost * call s:UpdateErrors(1) autocmd BufWinEnter * if empty(&bt) | call s:AutoToggleLocList() | endif