vgrep

Interactive grep with editor integration

TLDR

Search pattern
$ vgrep "[pattern]"
Search in directory
$ vgrep "[pattern]" [path]
Open results interactively
$ vgrep -s "[pattern]"
Show specific result
$ vgrep --show [index]
No git ignore
$ vgrep --no-git "[pattern]"

SYNOPSIS

vgrep [-s] [--show index] [options] pattern [path]

DESCRIPTION

vgrep is a pager for grep results that assigns an index number to each match, allowing you to quickly open specific results in your editor by number. It respects .gitignore rules by default and provides both batch and interactive modes.In interactive mode (-s), results can be browsed and opened directly. The --show flag opens a previously indexed result without re-running the search, making it efficient for navigating through matches in a codebase.

PARAMETERS

-s

Interactive mode.
--show INDEX
Show result by index.
--no-git
Don't use gitignore.
-n
Line numbers.
-i
Case insensitive.

INSTALL

sudo dnf install vgrep
sudo zypper install vgrep
brew install vgrep
nix profile install nixpkgs#vgrep

CAVEATS

Go implementation. Editor config needed. Different from grep.

HISTORY

vgrep was created for quickly searching code and opening results in an editor by index.

SEE ALSO

grep(1), rg(1), ag(1)