On Sun, Sep 20, 2009 at 8:47 AM, John Beckett <johnb.beck...@gmail.com>wrote:

>
> 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>
>
>
Thanks for the mapping.  The only thing I don't understand is the "<Bar>cw",
what does it mean and for?  Thanks.



> Now put the cursor on any word and press F4.
>
> John
>
>
> >
>


-- 
Life is the only flaw in an otherwise perfect nonexistence
   -- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 (narkewo...@gmail.com)

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to