created September 28, 2001 · complexity basic · author Anon · version 6.0
The use of star as in The super star is great. Here is how to use this type of search across a whole directory.
Just add the mappings (or choose different letter combinations):
map gr :grep <cword> *<cr> map gr :grep <cword> %:p:h/*<cr> map gR :grep \b<cword>\b *<cr> map GR :grep \b<cword>\b %:p:h/*<cr>
Mapping one will search for the word under the cursor (like g*) in any of the files in the current directory.
Mapping two will search for the word under the cursor (like g*) in any of the files in the same directory as the current file.
Mapping three will search for the word under the cursor by itself (i.e. surrounded by word boundary like *) in any of the files in the current directory.
Mapping four will search for the word under the cursor by itself (i.e. surrounded by word boundary like *) in any of the files in the same directory as the current file.