🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3107

Re: Query-replace on VI

#3107
From: Bill.Stewart.<ho95c>
Date: Fri, 29 Apr 1988 02:58
16 lines
1090 bytes
In article <27909@yale-celray.yale.UUCP> choy-albert@CS.YALE.EDU (Albert M. Choy) writes:
>  Does anyone know if VI has the query-replace function?  

Two ways to do it, both from the manual:
1)	/foo	# search for foo
	cwBAR	# replace it with BAR
	n	# find next foo		### repeat these two steps
	.	# do cwBAR again	### many times.

2)	:g/foo/s//BAR/gc		### works in ex-mode
	
-- 
#				Thanks;
# Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs
# skep2 is a local machine I'm trying to turn into a server.  Please send
# mail to ho95c or ho95e instead.  Thanks.
Technical Details
Message-ID: <86@skep2.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!rutgers!mtunx!whuts!homxb!ho95e!skep2!wcs
References: <2587@geac.UUCP> <27909@yale-celray.yale.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!rutgers!mtunx!whuts!homxb!ho95e!skep2!wcs
From: wcs@skep2.ATT.COM (Bill.Stewart.<ho95c>)
Newsgroups: comp.editors
Subject: Re: Query-replace on VI
Message-ID: <86@skep2.ATT.COM>
Date: 29 Apr 88 02:58:17 GMT
References: <2587@geac.UUCP> <27909@yale-celray.yale.UUCP>
Reply-To: wcs@skep2.UUCP (46323-Bill.Stewart.<ho95c>,2G218,x0705,)
Organization: AT&T Bell Labs Center 4632, Holmdel, NJ
Lines: 16
Summary: RTFM