aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-24 17:06:35 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-24 17:06:35 +1200
commita2eccef1861e2c0be988bc182d7b14be94ebc9ed (patch)
treec0abe0d25df4ff53da58ce617eb228e424e61930
downloadvim-quickfix-auto-open-a2eccef1861e2c0be988bc182d7b14be94ebc9ed.tar.gz
vim-quickfix-auto-open-a2eccef1861e2c0be988bc182d7b14be94ebc9ed.zip
First versionv0.1.0
-rw-r--r--README.md18
-rw-r--r--VERSION0
-rw-r--r--doc/quickfix_auto_open.txt24
-rw-r--r--plugin/quickfix_auto_open.vim22
4 files changed, 64 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..12847ba
--- /dev/null
+++ b/README.md
@@ -0,0 +1,18 @@
+quickfix\_auto\_open.vim
+========================
+
+This is a tiny plugin packaging of hooks to automatically open the quickfix and
+location lists when a command that changes their contents is run.
+
+Credits
+-------
+
+This is just a plugin repackaging of a fragment from romainl's "minivimrc"
+project on GitHub: <https://github.com/romainl/minivimrc>
+
+License
+-------
+
+Distributed under the same terms as Vim itself, probably. See `:help license`.
+
+[1]: https://sanctum.geek.nz/
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/VERSION
diff --git a/doc/quickfix_auto_open.txt b/doc/quickfix_auto_open.txt
new file mode 100644
index 0000000..c9fc24b
--- /dev/null
+++ b/doc/quickfix_auto_open.txt
@@ -0,0 +1,24 @@
+*quickfix_auto_open.txt* For Vim version 7.0 Last change: 2018 Jul 24
+
+DESCRIPTION *quickfix_auto_open*
+
+This is a tiny plugin packaging of hooks to automatically open the quickfix
+and location lists when a command that changes their contents is run.
+
+REQUIREMENTS *quickfix_auto_open-requirements*
+
+This plugin is only available if 'compatible' is not set. It also requires the
+|+autocmd| feature.
+
+AUTHOR *quickfix_auto_open-author*
+
+Original commands were found in romainl's "minivimrc" project on GitHub:
+<https://github.com/romainl/minivimrc>
+
+Plugin packaging and documentation by by Tom Ryder <tom@sanctum.geek.nz>.
+
+LICENSE *quickfix_auto_open-license*
+
+Licensed for distribution under the same terms as Vim itself (see |license|).
+
+ vim:tw=78:ts=8:ft=help:norl:
diff --git a/plugin/quickfix_auto_open.vim b/plugin/quickfix_auto_open.vim
new file mode 100644
index 0000000..e2f111f
--- /dev/null
+++ b/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