Path: utzoo!attcan!uunet!cs.utexas.edu!usc!samsung!munnari.oz.au!metro!pta!yarra!bohra!als From: als@bohra.cpg.oz (Anthony Shipman) Newsgroups: comp.unix.questions Subject: Re: Vi question Summary: doesn't work for me Message-ID: <364@bohra.cpg.oz> Date: 28 Jun 90 07:07:21 GMT References: <13132@ulysses.att.com> <2571@awdprime.UUCP> Organization: Computer Power Group, Melb, Australia Lines: 21 In article <2571@awdprime.UUCP>, tif@doorstop.austin.ibm.com (/32767) writes: > In article <13132@ulysses.att.com> mab@ulysses.att.com (Muhammad Basit) writes: > >I have a simple vi question. How do I substitute a character with the > >newline character in vi? I tried '\n', '\\n', the ascii code etc but > >it doesn't seem to work. > > Assuming that isn't what you want, type > > Qs/search-pattern/\/vi I have always used : to get the ex commands and the behaviour is different. When using : the \ doesn't work, instead you could use ^V :s/search-pattern/^V^M/ symmetrically, ^V doesn't work if Q is used to get to ex! -- Anthony Shipman ACSnet: als@bohra.cpg.oz.au Computer Power Group 9th Flr, 616 St. Kilda Rd., St. Kilda, Melbourne, Australia D