Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Syntastic close just the error window

Tags:

vim

syntastic

I've got the (Mac)Vim Syntastic plugin installed via Janus. When I open the :Errors window to view the reason for syntax errors, it shrinks the file with the errors to one line and uses the rest of the real estate for the Errors window.

Is there a way to make it hog less room for errors and more importantly, how do I close just the Errors window? The usual :q closes both the Errors window AND the original file, even if the cursor is in the Errors window. (That's not 100% correct -- it gratefully does not close the file if the file hasn't yet been saved).

like image 341
Dave Avatar asked Sep 23 '13 14:09

Dave


2 Answers

Syntastic uses the location list (a window-local variant of the quickfix list), so a :lclose will close it, but keep the other buffers.

As per syntastic's help pages, the initial height can be configured:

:let g:syntastic_loc_list_height=5 

But I suspect that your intrusive Janus distribution has a hand in that. Vim "distributions" like spf-13 and Janus lure you with a quick install and out of the box settings, but you pay the price with increased complexity (you need to understand both Vim's runtime loading scheme and the arbitrary conventions of the distribution) and inflexibility (the distribution may make some things easier, but other things very difficult). Vim is incredibly customizable, using someone else's customization makes no sense.

like image 54
Ingo Karkat Avatar answered Oct 03 '22 08:10

Ingo Karkat


The command to close the Syntastic error window is:

:SyntasticReset 
like image 33
PokerFace Avatar answered Oct 03 '22 10:10

PokerFace