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
endif
" Syntax highlighting