--- "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote: > Neil Gabriel wrote: > >> On 11/9/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: > >> > Neil Gabriel wrote: > >> > > I did in fact look at that. Reading through the "internal" grep > >> > > however, I do not see a way of running a recursive search (i could be > >> > > missing it). > >> > > > >> > > Thanks > >> > > >> > If you mean recursing into directories, see the ** wildcard. I don't > >> remember > >> > where in the help it's mentioned but that's what it means. > >> > > >> > A few (untested) silly examples: > >> > > >> > :vimgrep /\<if\>/g $VIMRUNTIME/**/*.vim > >> > > >> > to find all "if" statements in all distributed Vim scripts. > >> > > >> > > >> > vimgrep /\s/g /**/* > >> > > >> > to find all spaces and tabs anywhere on your hard disk (the current > >> drive on > >> > Windows, _all_ currently mounted filesystems on Unix). This might, > >> of course, > >> > take quite a lot of time. Don't try it unless you're ready to go to > >> bed and > >> > see in the morrow whether Vim has finished searching! > >> > > >> > > >> > Best regards, > >> > Tony. > >> > > >> > P.S. > >> > 1. Top-posting is frowned upon in the Vim lists. > >> > 2. Please don't use private mail unless you're straying off-topic. I > >> suppose > >> > you can educate yourself to use "Reply to All" (or "Reply to List" > >> if your > >> > mailer offers it) rather than "Reply to Sender", can't you? > >> > > >> > > > > On 11/9/06, Neil Gabriel <[EMAIL PROTECTED]> wrote: > >> Thanks for the info.. I will be sure to use 'Reply to all'. With > >> regard to top vs. bottom posting, i'll have to dig through my gmail > >> settings... I image they support either way. > >> > >> Thanks again > >> > > > > Btw ... Is there a way to map a key such that vim will invoke vimgrep > > on whatever symbol the cursor is on? > > > > Of course. Since Ctrl-R Ctrl-W inserts (in Command-line mode) the word under > the cursor, you can use (untested): > > :map <F3> :vimgrep /<Bslash><lt><C-R><C-W><Bslash><gt>/g<Space>
Hello, <gt> is the only part which doesn't work, so you can use: :map <F3> :vimgrep /<Bslash><lt><C-R><C-W><Bslash>>/g<Space> or just :map <F3> :vimgrep /<C-R><C-W>/g<Space> regards, Peter > > The cursor will (if I didn't goof) stop on the command-line, ready for you to > > insert the filename(s) (possibly with wildcards) then hit Return. > > See ":help keycodes" and ":help <>" about how special keys have been > represented. > > > Best regards, > Tony. > Send instant messages to your online friends http://au.messenger.yahoo.com