🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3123

Re: Query-replace on VI

#3123
From: Hans Mulder
Date: Fri, 06 May 1988 17:41
16 lines
988 bytes
In article <3536@psuvax1.psu.edu> schwartz@gondor.cs.psu.edu (Scott Schwartz) writes:
>In article <393@aiva.ed.ac.uk> ken@uk.ac.ed.aiva (Ken Johnson,E32 SB x212E) writes:
>>>>  Does anyone know if VI has the query-replace function?  
>Try this:
>use "/from" to find your query
>use ":s/from/to/" to replace it
>then repeatedly use "/" to jump the the next instance of the from pattern, and 
>":s" to change it.

When you get tired of hitting <return> every other keystroke, use
"n" to search forward to the next occurance of "from"
"N" to search backward
"&" to change it

--
Hans Mulder	hansm@cwi.nl	mcvax!hansm
Technical Details
Message-ID: <303@piring.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!hansm
References: <2587@geac.UUCP> <27909@yale-celray.yale.UUCP> <86@skep2.ATT.COM> <393@aiva.ed.ac.uk> <3536@psuvax1.psu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!hansm
From: hansm@cwi.nl (Hans Mulder)
Newsgroups: comp.editors
Subject: Re: Query-replace on VI
Message-ID: <303@piring.cwi.nl>
Date: 6 May 88 17:41:01 GMT
References: <2587@geac.UUCP> <27909@yale-celray.yale.UUCP> <86@skep2.ATT.COM> <393@aiva.ed.ac.uk> <3536@psuvax1.psu.edu>
Organization: CWI, Amsterdam
Lines: 16