Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!swrinde!ucsd!pacbell.com!pacbell!att!mcdchg!laidbak!obdient!gagme!grahj From: grahj@gagme.chi.il.us (jim graham) Newsgroups: comp.editors Subject: Re: A vi question Keywords: substitute, vi Message-ID: <648@gagme.chi.il.us> Date: 14 Aug 90 01:59:11 GMT References: <1990Aug12.194738.7902@ecn.purdue.edu> <860@ai.cs.utexas.edu> Distribution: na Organization: GAGME - Public Access UNIX of Niles, Illinois, USA, Earth Lines: 19 > I need to do the following in vi. >[ Change text like "ccccoooossss" to "cos" ] If you are trying to get rid of the attempt at BOLD text that nroff uses (i.e., backspacing and re-typing the same character over and over again), there is a better solution.... There is a program called ``pep'' that resides on a number of the machines that archive sources for UN*X, that will filter out all of this nonsense for you. If the original file is called foo.txt, you would do something like this: pep < foo.txt > foo.new mv foo.new foo.txt (if you like foo.new....) NOTE: I include the part about ``if you like foo.new'' because I'm not sure if you need to use just ``pep'' or ``pep -b''. I know one of those works perfectly (IF THIS IS WHAT YOU HAD IN MIND). Hope this helps..... Jim Graham