From: Oleg Broytman Date: Mon, 1 Oct 2018 13:07:47 +0000 (+0300) Subject: .vimrc: Exit vim if the only window is option window X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=d474db69949cdfdd4cfed1db74a259cb06f68bd0 .vimrc: Exit vim if the only window is option window --- diff --git a/.vimrc b/.vimrc index 9128b94..147fb38 100644 --- a/.vimrc +++ b/.vimrc @@ -315,7 +315,8 @@ 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" | quit | endif +autocmd WinEnter * if winnr('$') == 1 && + \ index(["nofile", "quickfix"], &buftype) >= 0 | quit | endif endif " Syntax highlighting