Vim Tips Wiki


1,623pages on
this wiki

Use this page to discuss script 2545 bufgrep: vimgrep for buffers

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.


Not a bad little script, but you can do the same thing with:

:silent bufdo vimgrepadd /<REGEX>/ %

of course the "silent" is optional:

:bufdo vimgrepadd /<REGEX>/ %

This command loops through all of the buffers and greps the current buffer for the regex and appends the results to the quickfix list. You can't use vimgrep instead of vimgrepadd because each buffer will overwrite the quickfix from the previous buffer. --jearsh

Around Wikia's network

Random Wiki