Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!gdt!chpetk From: chpetk@gdr.bath.ac.uk (Toby Kelsey) Newsgroups: comp.unix.shell Subject: Re: changing a ! to a \nC where \n is a newline Keywords: vi Message-ID: <1990Sep20.120702.26466@gdr.bath.ac.uk> Date: 20 Sep 90 12:07:02 GMT References: <5015@alpha.cam.nist.gov> <2961@wyse.wyse.com> Organization: School of Chemistry, University of Bath, UK Lines: 12 >In article <5015@alpha.cam.nist.gov> coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes: > >How about the reverse, replace a newline with a character? By doing :g/pattern/j (note small j) in vi, you replace the newline and leading spaces on the next line by a space; and :g/pattern/j! concatenates the lines without inserting a space. -- Toby Kelsey (chpetk@uk.ac.bath.gdr)