[GLLUG] vi selective search/replace

Charles Williams willcha@sme.org
Thu, 11 Apr 2002 16:13:53 -0400


Yeh that's the system I use now. That works fine by me actually. Sometimes I
wonder if there's a different undocumented way to selectively
search/replace. Ok I can live with this. 
Thanks,
Chuck Williams

> -----Original Message-----
> From:	Cory Spitz [SMTP:spitzcor@cray.com]
> Sent:	Thursday, April 11, 2002 3:53 PM
> To:	linux-user@egr.msu.edu
> Subject:	Re: [GLLUG] vi selective search/replace
> 
> 
> Well,
> 
> If you want to do yes/no anyway, you can go to the old fashioned
> method.
> 
> To start, do a search for your target, say '/foo'. Then do a cw
> command to replace the text with what you want, say 'cwbar' Then do a
> 'n' command to find the next matching string. If you want to replace
> it use the repeat command '.' to do the cw again. If you don't want to
> replace just 'n' again to find the next matching string.
> 
> Old school.
> 
> -Cory
> 
> 
> On Thu, 11 Apr 2002, Charles Williams wrote:
> 
> > Does anyone know a way to selectively search/replace in the vim editor?
> >
> > Like chuck is a lucky duck
> >
> > and I do global search/replace :%s/uck/zzz/
> >
> > but I want to choose Y or N for each replace maybe.
> >
> > thanks,
> > chuck williams
> > willcha@sme.org
> > _______________________________________________
> > linux-user mailing list
> > linux-user@egr.msu.edu
> > http://www.egr.msu.edu/mailman/listinfo/linux-user
> >
> 
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user