- Notifications
You must be signed in to change notification settings - Fork750
Charles Gueunet edited this pageOct 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'sgrep
command, it populates a special*grep*
buffer, listing all found occurrences.You can then usegrep-next-match
orgrep-previous-match
to navigate between them.
By default, kakoune will rungrep -RHn
in the background:
-R
,--dereference-recursive
Read all files under each directory, recursively. Follow all symbolic links-H
,--with-filename
Print the file name for each match.-n
,--line-number
Prefix each line of output with the 1-based line number within its input file
You can customize this value by setting thegrepcmd
option.For instance, you may want to to rely on a similar tool to do the job, such asAg (The Silver Searcher),Ack orripgrep:
set-option global grepcmd 'rg --column'
- Normal mode commands
- Avoid the escape key
- Implementing user mode (Leader key)
- Kakoune explain
- Kakoune TV