Is there a way to close all locations lists and quick fix windows with a single command in vim/gvim?

link|improve this question

73% accept rate
feedback

1 Answer

:windo if &buftype != "quickfix" | lclose | endif

That will execute the :lclose command in all windows not displaying quickfix or location lists. I didn't have a set of location lists to test it with, so I tested with a different buffer type and it worked for that case.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.