Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!veritas!geoff From: geoff@Veritas.COM (Geoffrey Leach) Newsgroups: comp.editors Subject: Re: Global Empty Line Removal in vi? Message-ID: <1991Jan24.172344.28877@Veritas.COM> Date: 24 Jan 91 17:23:44 GMT References: Organization: VERITAS Software Lines: 10 From article , by chris@bilby.cs.uwa.oz.au (chris mcdonald): > In <1991Jan24.064310.8077@midway.uchicago.edu> zi0h@quads.uchicago.edu (W. Ishii) writes: > >>Hello there! As a vi novice (maybe a stronger term is called for--vi idiot, >>probably), I've been stuck for about a week now trying to figure out how to >>globally remove multiple blank lines from text. > > Filter the whole file (with !! ) through cat -s Try ":g/^$/d"