From 4b0c278a08c785cf07cb746b01b815217ca9752b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 24 Jul 2018 11:25:03 +1200 Subject: Move quickfix auto-open into a little plugin file I might package this one up, but it's not original and it's so tiny/trivial it's probably not going to get uploaded on vim.org. --- vim/plugin/quickfix_auto_open.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 vim/plugin/quickfix_auto_open.vim (limited to 'vim/plugin') diff --git a/vim/plugin/quickfix_auto_open.vim b/vim/plugin/quickfix_auto_open.vim new file mode 100644 index 00000000..e2f111fb --- /dev/null +++ b/vim/plugin/quickfix_auto_open.vim @@ -0,0 +1,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 +" 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 -- cgit v1.2.3