From: Oleg Broytman Date: Wed, 6 Jul 2016 20:37:54 +0000 (+0300) Subject: .vimrc: automatically close quickfix if it's the only window left X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=1c753e75b5766ac44ee48a6a67b2765103171d1d;p=dotfiles.git .vimrc: automatically close quickfix if it's the only window left --- diff --git a/.vimrc b/.vimrc index bc4a54a..8892527 100644 --- a/.vimrc +++ b/.vimrc @@ -271,6 +271,8 @@ autocmd BufWritePost ~/.vimrc source ~/.vimrc | syntax on if version >= 700 " Save all files before running any quickfix command (grep, makeprg, etc.) autocmd QuickFixCmdPre * wall +" automatically close quickfix if it's the only window left +autocmd WinEnter * if winnr('$') == 1 && &buftype == "quickfix" | q | endif endif " Syntax highlighting