> I am using Vim 7.3 on Windows 7 Enterprise 32-bit.
>
> I'm use the quickfix list a lot with vimgrep. I swap between lists by
> the :cold and :cnew commands. However, after much editing, the lists
> get out-of-date. When I cruise between lists, I often forget the
> vimgrep expression, and the command history q: doesn't help after much
> editing and flipping between lists. Is there a way to: (1) recall the
> vimgrep expression associated with the currently viewed quickfix list,
> and (2) refresh the list by effectively redoing the vimgrep? For #2,
> I can see advantages and disadvantages to putting the repeated vimgrep
> onto the command history as a new entry.
I think since Vim 7.3 the quickfix window should always have the variable
w:quickfix_title set which contains the command that created this list.
Unfortunately, until at least patch 7.3.280 that variable wasn't always
updated so often did contain only the first command, but that patch
should have fixed that.
The $VIMRUNTIME/ftplugin/qf.vim should also set the statusline in the
quickfix window to display that variable.
Assuming you have been in the quickfix window before and are now in
another window, something like that should be possible to redo
the command, that created the quickfix window:
:exe getwinvar(winnr('#'), 'quickfix_title')
regards,
Christian
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment