Enter the command :set grepprg? to determine what program is used on your system to execute the :grep command. If it is the grep utility, the following mappings allow searching files in a directory for the word under the cursor. :nnoremap gr :grep * :nnoremap Gr :grep %:p:h/* :nnoremap gR :grep '\b\b' * :nnoremap GR :grep '\b\b' %:p:h/* The first mapping searches for the text in the word under the cursor (like g*) in any of the files in the current directory. The third mapping searches for the whole word under the cursor (like *) in any of the files in the current directory.
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
Version |
|
dbkwik:vim/property/wikiPageUsesTemplate | |
Previous |
|
Category |
|
Complexity |
|
Created |
|
ID |
|
NEXT |
|
Rating |
|
abstract |
|