From f6685e6cb10cc5783252e651c85e5adb93bc4692 Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Sun, 21 Aug 2022 04:04:38 +0530 Subject: [PATCH] vgrep: add page (#8383) * vgrep: add page Signed-off-by: Muhammad Falak R Wani * vgrep: fix token syntax Signed-off-by: Muhammad Falak R Wani * vgrep: appease the linter Signed-off-by: Muhammad Falak R Wani Signed-off-by: Muhammad Falak R Wani --- pages/common/vgrep.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/common/vgrep.md diff --git a/pages/common/vgrep.md b/pages/common/vgrep.md new file mode 100644 index 0000000000..75e345abe2 --- /dev/null +++ b/pages/common/vgrep.md @@ -0,0 +1,33 @@ +# vgrep + +> A user friendly pager for grep. +> See also: `ugrep`, `rg`. +> More information: . + +- Recursively search the current directory for a pattern and cache it: + +`vgrep {{search_pattern}}` + +- Display the contents of the cache: + +`vgrep` + +- Open the "4th" match from the cache in the default editor: + +`vgrep --show {{4}}` + +- Display a context of "3" lines for each match in the cache: + +`vgrep --show=context{{3}}` + +- Display the number of matches for each directory in the tree: + +`vgrep --show=tree` + +- Display the number of matches for each file in the tree: + +`vgrep --show=files` + +- Start an interactive shell with cached matches: + +`vgrep --interactive`