]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
.profile, .shellrc: test $BASH_VERSION instead of $SHELL
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index bc4a54ab55e9fae8ac9c1916511d3d184a35ed3e..88925276d9b817e00f52f7222470d70a860f8a5f 100644 (file)
--- 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