aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-24 11:25:03 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-24 11:25:43 +1200
commit4b0c278a08c785cf07cb746b01b815217ca9752b (patch)
treef78718969c4c10dca78c2aa3528cebcad7cd8008 /vim/plugin
parentBump up 'history' again (diff)
downloaddotfiles-4b0c278a08c785cf07cb746b01b815217ca9752b.tar.gz
dotfiles-4b0c278a08c785cf07cb746b01b815217ca9752b.zip
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.
Diffstat (limited to 'vim/plugin')
-rw-r--r--vim/plugin/quickfix_auto_open.vim22
1 files changed, 22 insertions, 0 deletions
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 <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