aboutsummaryrefslogtreecommitdiff
path: root/plugin/quickfix_auto_open.vim
blob: e2f111fb5d8750eb4f7ff00d7e88bc56acbf1af8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"
" quickfix_auto_open.vim: Always pop open the quickfix list or location list
" when they're changed. Dispassionately stolen from romainl's minivimrc.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('g:loaded_quickfix_auto_open') || &compatible
  finish
endif
if !exists('##QuickfixCmdPost') || !exists('##VimEnter')
  finish
endif
let g:loaded_quickfix_auto_open = 1

" Always pop open quickfix and location lists when changed
augroup quickfix_auto_open
  autocmd!
  autocmd QuickfixCmdPost [^l]* cwindow
  autocmd QuickfixCmdPost l* lwindow
  autocmd VimEnter * cwindow
augroup END