I work in a lot of legacy files that are huge and previous devs didn't always follow proper styles, so syntastic gives me a ton of linting errors that I don't care about right now. I put syntastc into passive mode and manually check the file then close the location list, which works great. But, after I've manually checked it, every time I :w, the location list opens back up and shows the previous errors. I can't figure out a way to keep this from happening. Any suggestions?
Asked
Active
Viewed 2,128 times
8
-
1Syntastic is not a mind reader. For this reason, you're supposed to run `:SyntasticReset` to let it know you want it to shut up, rather than just close the error window. – lcd047 Oct 06 '16 at 14:16
-
thanks, I hadn't heard of the function. I guess I'll have to run that after checking so everything stays closed until I want it. – gignosko Oct 06 '16 at 14:35
-
@lcd047: why would it open the location list in passive mode? – Eugene Yarmash Oct 06 '16 at 14:42
-
@eugeney Because `BufEnter` triggers a notification refresh, so that the error window gets updated when you switch buffers.. – lcd047 Oct 06 '16 at 14:47
-
@lcd047 That's good to know, thanks for clearing that up. – gignosko Oct 06 '16 at 14:48
2 Answers
11
One can prevent the location list from opening using syntastic_auto_loc_list=0
. A pretty unobtrusive setup is:
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_auto_jump = 0
Combined with highlighting to see the errors better:
hi SpellBad term=reverse ctermbg=darkgreen

tsh
- 2,275
- 1
- 14
- 18
0
Do you have the syntastic_mode_map
option set in your .vimrc
? This may influence how Syntastic does automatic checking:
In passive mode, automatic checks are still done for filetypes in the "active_filetypes" array (and "passive_filetypes" is ignored). In active mode, automatic checks are not done for any filetypes in the "passive_filetypes" array ("active_filetypes" is ignored).

Eugene Yarmash
- 142,882
- 41
- 325
- 378
-
Yeah, I have the mode map set to passive in my vimrc, which turned off the auto checking for me. But the location list opens every time I save or move into that buffer from another buffer, such as a split. – gignosko Oct 06 '16 at 14:30