On Thu, 1 Mar 2007 at 5:25pm, Naim Far wrote: > Thanx Yakov for your response, > > It would help, but I would rather to do it with in working in vim. I'm > editing an enormous number of files, and when I change a pattern, I want > to change it in the few files that has this pattern, and not having to > go through all the files. > > Is there anyway you could think of?!
Try: :args `grep -l 'pattern' *` | argdo :%s/<pattern>/<new_pattern>/g You will have to make sure 'hidden' is set or tack on "| w" at the end. -- HTH, Hari > > Thanx again... > > Naim > > > -----Original Message----- > From: Yakov Lerner [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 01, 2007 2:20 PM > To: Naim Far > Cc: vim@vim.org > Subject: Re: argdo and grep > > On 3/1/07, Naim Far <[EMAIL PROTECTED]> wrote: > > I was wondering about argdo! Is there anyway to do the following > > command > > > > :grep <pattern> * | argdo :%s/<pattern>/<new_pattern>/g > > How about this: > vim `grep -l 'pattern' *` > :argdo :%s/<pattern>/<new_pattern>/g > > Yakov > > ____________________________________________________________________________________ 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news