Vim Tips Wiki


1,623pages on
this wiki
Add New Page
Add New Page Talk0

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

Also on Fandom

Random Wiki