From 6adaaffabdc9696aa37739339815a436ab9c56e5 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Fri, 20 Aug 2021 18:39:18 -0700 Subject: [PATCH] Disable syntastic active mode in readonly mode. --- dotfiles/vimrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 905aa67..46382d0 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -133,11 +133,18 @@ endfunction " Options for syntastic let g:syntastic_enable_signs = 1 let g:syntastic_auto_loc_list = 2 +let g:syntastic_check_on_wq = 0 let g:syntastic_go_checkers = ['govet', 'errcheck', 'go'] let g:syntastic_python_checkers=['flake8'] " Because XXE let g:syntastic_xml_checkers=[''] let g:syntastic_xslt_checkers=[''] +autocmd BufReadPost * + \ if &readonly + \| let b:syntastic_mode = 'passive' + \| else + \| silent! unlet b:syntastic_mode + \| endif " Have F5 run the tests and display errors nnoremap :SyntasticCheck :Errors