From a2eccef1861e2c0be988bc182d7b14be94ebc9ed Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 24 Jul 2018 17:06:35 +1200 Subject: First version --- README.md | 18 ++++++++++++++++++ VERSION | 0 doc/quickfix_auto_open.txt | 24 ++++++++++++++++++++++++ plugin/quickfix_auto_open.vim | 22 ++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 README.md create mode 100644 VERSION create mode 100644 doc/quickfix_auto_open.txt create mode 100644 plugin/quickfix_auto_open.vim 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: + +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 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: + + +Plugin packaging and documentation by by Tom Ryder . + +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 +" 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