I think that it can be useful to disable syntastic by default, and enable it when you want to use it (via SyntasticEnable).
Currently you can only disable it using g:syntastic_disabled_filetypes, which expects a list of filetypes to exclude.
I see two options:
SyntasticEnable would toggle).Check out master now - most notably this commit https://github.com/scrooloose/syntastic/commit/78fbd7fa13f5565cbdf584fd42ea2cfc33befb35.
There is also :SyntasticToggleMode to switch between active/passive modes. Ill be updating the doc etc soon, but the commit message should give you enough to get started.
Could there be a keyword like 'disable' or 'turn off' next to :SyntasticToggleMode ? Asking because that's what I looked for while looking for this feature. I didn't find it so I resorted to google.
@shurane If you switch to passive mode, the files are not checked unless you explicitly request it. In passive mode nothing much happens in background, only the status line is updated, so there isn't much point in disabling Syntastic. But yes, there is no way to disable Syntastic completely (and adding such a feature wouldn't be trivial).
Putting the following in my .vimrc worked for me (as a workaround):
autocmd VimEnter * SyntasticToggleMode " disable syntastic by default
It runs :SyntasticToggleMode when opening Vim.
@taromero I strongly recommend you to invest a few minutes in reading the manual.
@lcd047 why would that be?
:+1: I'd love an easy way to disable Syntastic if Neomake is installed.
@LandonSchropp As I said above: if you switch to passive mode, the files are not checked unless you explicitly request it:
let g:syntastic_mode_map = { 'mode': 'passive' }
How to detect Neomake is installed and / or active is a question for Neomake authors.
Having
let g:syntastic_mode_map = {"mode": "passive", "active_filetypes": ["python"], "passive_filetypes": [] }
in ~/.vim/vimrc
command ToggleSyntastic if !exists('g:syntastic_mode_map_bak') | let g:syntastic_mode_map_bak = g:syntastic_mode_map | let g:syntastic_mode_map = {'mode':'passive'} | else | let g:syntastic_mode_map = g:syntastic_mode_map_bak | unlet g:syntastic_mode_map_bak | endif
map <C-F7> :ToggleSyntastic<CR>
imap <C-F7> <C-o>:ToggleSyntastic<CR>
@andbar-ru This is exactly what :SyntasticToggleMode does.
Most helpful comment
@LandonSchropp As I said above: if you switch to passive mode, the files are not checked unless you explicitly request it:
How to detect Neomake is installed and / or active is a question for Neomake authors.