Path: 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 >/* 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