-
Notifications
You must be signed in to change notification settings - Fork 753
Grep
Charles Gueunet edited this page Oct 6, 2020
·
3 revisions
grep is a command-line utility for searching plain-text data sets for lines that match a regular expression.
rc/tools/grep.kak is a small wrapper around it.
When you use the kakoune's grep command, it populates a special *grep* buffer, listing all found occurrences.
You can then use grep-next-match or grep-previous-match to navigate between them.
By default, kakoune will run grep -RHn in the background:
-
-R,--dereference-recursiveRead all files under each directory, recursively. Follow all symbolic links -
-H,--with-filenamePrint the file name for each match. -
-n,--line-numberPrefix each line of output with the 1-based line number within its input file
You can customize this value by setting the grepcmd option.
For instance, you may want to to rely on a similar tool to do the job, such as Ag (The Silver Searcher), Ack or ripgrep:
set-option global grepcmd 'rg --column'
- Normal mode commands
- Avoid the escape key
- Implementing user mode (Leader key)
- Kakoune explain
- Kakoune TV
