Steven Woody wrote:
>> That point is covered here:
>> http://vim.wikia.com/wiki/Find_in_files_within_Vim
>
> I see that is <cword>, but while I can do ':vimgrep
> /\<my_word\>/ **/*.c, but the ':vimgrep /\<<cword>\>/ **.c'
> failed, it just found nothing.
I was too lazy to tell you about Ctrl-R Ctrl-W.
If you want to search all *.c files in the current directory,
you would execute the following (put cursor on line, press Y
then type @" or just put it in your vimrc):
:map <F4> :execute "vimgrep /" . expand("<cword>") . "/j *.c"<Bar>cw<CR>
Now put the cursor on any word and press F4.
John
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---