[GLLUG] vi selective search/replace
Cory Spitz
spitzcor@cray.com
Thu, 11 Apr 2002 14:52:35 -0500
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
>