diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-25 16:58:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-25 16:58:46 +0200 |
commit | 7fd7320014fb34788ef53fe7c78521b5c25e052e (patch) | |
tree | 8249c7e405578cde42c319b9c216bd868809682c /runtime | |
parent | fa0ff9aedf9515638e15726141c4a08ca4e05255 (diff) | |
download | vim-git-7fd7320014fb34788ef53fe7c78521b5c25e052e.tar.gz |
Add "q" item for 'statusline'. Add w:quickfix_title. (Lech Lorens)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 1 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 8 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 3 | ||||
-rw-r--r-- | runtime/ftplugin/quickfix.vim | 16 |
4 files changed, 23 insertions, 5 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 17c6a46ec..8e2b5e072 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6523,6 +6523,7 @@ A jump table for the options with a short description can be found at |Q_op|. y F Type of file in the buffer, e.g., "[vim]". See 'filetype'. Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'. {not available when compiled without |+autocmd| feature} + q S "[Quickfix List]", "[Location List]" or empty. k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are being used: "<keymap>" n N Buffer number. diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index d710e97a5..972ebd89d 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -301,7 +301,7 @@ use this code: > ============================================================================= 2. The error window *quickfix-window* - *:cope* *:copen* + *:cope* *:copen* *w:quickfix_title* :cope[n] [height] Open a window to show the current list of errors. When [height] is given, the window becomes that high (if there is room). Otherwise the window is made ten @@ -310,7 +310,11 @@ use this code: > 'buftype' equal to "quickfix". Don't change this! If there already is a quickfix window, it will be made the current window. It is not possible to open a - second quickfix window. + second quickfix window. The window will have the + w:quickfix_title variable set which will indicate the + command that produced the quickfix list. This can be + used to compose a custom status line if the value of + 'statusline' is adjusted properly. *:lop* *:lopen* :lop[en] [height] Open a window to show the location list for the diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index a7c9aaf34..b89c25fab 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -30,9 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -Include patch for horizontal scoll wheel? (Bjorn Winckler, 2010 Jul 20) -Additional patch Jul 21. - 6 In the quickfix window statusline add the command used to get the list of errors, e.g. ":make foo", ":grep something *.c". New patch 2010 Jul 24 diff --git a/runtime/ftplugin/quickfix.vim b/runtime/ftplugin/quickfix.vim new file mode 100644 index 000000000..f1d09225f --- /dev/null +++ b/runtime/ftplugin/quickfix.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: Vim's quickfix window +" Maintainer: Lech Lorens <Lech.Lorens@gmail.com> +" Last Changed: 22 Jul 2010 + +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl stl<" + +" Display the command that produced the list in the quickfix window: +setlocal stl=%q%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''} |