On May 27, 1:18 pm, Chris Mueller <wormina...@gmail.com> wrote:
> Hola.
>
> Currently, I use...
>
> "View last search results in their own window (Cur file)
>
> nmap <leader>w :vimgrep //j %<CR>:copen<CR><CR>
>
> to open up a quickfix window of my last searched term in my quickfix
> window.  I usually have a number of buffers open; is it possible to do the
> same behavior, but in all open buffers?  (I'd like to map to <leader>W).  It
> seems at least once a day I want to do this; but I have not come up with an
> easy method yet.

As a starting point, consider this series of commands:

let g:buflist = ""
bufdo let g:buflist.=" ".expand("%:p")
execute "vimgrep //j ".g:buflist
copen

I assume you know how to find help on these commands. You can chain
them together in your mapping using \| or <Bar>. Tweak as desired.

Note, from your description, you may actually want :tabdo and/
or :windo instead of :bufdo, but I took your meaning literally.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to