RE: argdo and grep
- On Thu, 1 Mar 2007 at 5:25pm, Naim Far wrote:
> Thanx Yakov for your response,Try:
> 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?!
: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.
> Thanx again...
> -----Original Message-----
> From: Yakov Lerner [mailto:iler.ml@...]
> Sent: Thursday, March 01, 2007 2:20 PM
> To: Naim Far
> Cc: vim@...
> Subject: Re: argdo and grep
> On 3/1/07, Naim Far <naim@...> 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
8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.