I use a plugin in vim to compile Tex files. When there are errors on compilation, they are all displayed in a quick fix window at the bottom of the screen.
When I want to leave a file I'm working on (:q
, :wq
, etc) the quickfix window can be annoying because it stays open after I left the buffer of the file I was working on, forcing me to :q
on the quick fix window too.
Is there a way to tell vim to immediately execute :close
when I use :q
? I've tried several autocmds, but to no avail.
Add to your .vimrc
file
aug QFClose
au!
au WinEnter * if winnr('$') == 1 && &buftype == "quickfix"|q|endif
aug END
Warning: this will close vim if the quickfix window is the only window visible (and only tab).
The command :qa
will quit all open windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With