Buffergrep is a Vim plugin that enables users to search through buffers instead of files.
Buffergrep is a powerful Vim plugin that enables users to grep search buffers that may or may not be represented by a file on the disk. This plugin searches for strings in open buffers, and changes that haven't been saved to disk are scanned as well. However, unlisted, quickfix, and help buffers are skipped.
One impressive feature of buffergrep is that it uses the same syntax as the builtin :vimgrep and :lvimgrep commands. Results are displayed in the quickfix list, and the following commands are defined:
- Bgrep: Searches all buffers listed with the :buffers command, skipping over unlisted, quickfix, and help buffers. This is analogous to :bufdo.
- Agrep: Searches all buffers listed with the :args command. This is analogous to :argdo.
- Wgrep: Searches all buffers visible on the screen (current tab page only). This is analogous to :windo.
- Tgrep: Searches all buffers open on any tab page. This is analogous to :tabdo.
The user can utilize multiple search queries by splitting them with a vertical pipe. For example, the command Wgrep |foo|j will find the string 'foo' in all buffers currently on the screen but won't jump to the first match.
Buffergrep is an efficient and reliable solution for people who need a specialized searching solution within the Vim text editor.
About Vim:
Vim is a sophisticated text editor that was first released in 1991 for the Amiga computer. Vim was created as an extended version of the vi editor, with many additional features designed to be helpful in editing program source code. While Vim is cross-platform, it is most popular on Unix-like operating systems.
Released under a software license compatible with the GNU General Public License, Vim is free and open-source software. Interestingly, the program's license includes some charityware clauses.
Installing Buffergrep:
To install Buffergrep, the user needs to copy it into $HOME/.vim/plugins. Additionally, Vim users can take advantage of the built-in tutorial for beginners to learn how to use this plugin. Further help can be found on the Vim Users' Manual or by using the :help command.
Version 1.0: N/A