Path: utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!rutgers!mtunx!whuts!homxb!ho95e!skep2!wcs From: wcs@skep2.ATT.COM (Bill.Stewart.) 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.,2G218,x0705,) Organization: AT&T Bell Labs Center 4632, Holmdel, NJ Lines: 16 Summary: RTFM 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.