🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3115

Re: Query-replace on VI

#3115
From: wsmith
Date: Thu, 05 May 1988 02:04
19 lines
1154 bytes
>/* Written 12:10 pm  May  3, 1988 by ken@aiva.ed.ac.ukBARn uiucdcsm:comp.editors */
>
>
>>>  Does anyone knowBARf VI has the query-replace function?  
>
>>2)	:g/foo/s//BAR/gc		### worksBARn ex-mode
>
>Works, butBARtBARs not a query-replace;BARtBARs a global replace.
>As far as I can see thereBARs no way to do a query-replaceBARn `vi',
>butBARf thatBARs soBARt's a serious omission.
>-- 

The posting that I have munged is false.  The c flag at the end of the
command makes it be a query replace.  It make the replacement, I answered
'y RETURN' to the prompts.  
The command I used was :g/ i/s//BAR/gc

Bill Smith	wsmith@a.cs.uiuc.edu	ihnp4!uiucdcs!wsmith
Technical Details
Message-ID: <37200001@uiucdcsm>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bbn!mit-eddie!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uiucdcsm!wsmith
References: <27909@yale-celray.yale.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!bbn!mit-eddie!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uiucdcsm!wsmith
From: wsmith@uiucdcsm.cs.uiuc.edu
Newsgroups: comp.editors
Subject: Re: Query-replace on VI
Message-ID: <37200001@uiucdcsm>
Date: 5 May 88 02:04:00 GMT
References: <27909@yale-celray.yale.UUCP>
Lines: 19
Nf-ID: #R:yale-celray.yale.UUCP:27909:uiucdcsm:37200001:000:659
Nf-From: uiucdcsm.cs.uiuc.edu!wsmith    May  4 21:04:00 1988