Is there a way to close all locations lists and quick fix windows with a single command in vim/gvim?
:windo if &buftype == "quickfix" || &buftype == "locationlist" | 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.
You will probably want to make it a command or shortcut in your .vimrc as well.