Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!mcsun!hp4nl!sci.kun.nl!cs.kun.nl!hansm From: hansm@cs.kun.nl (Hans Mulder) Newsgroups: comp.editors Subject: Re: Global Empty Line Removal in vi? Summary: use 1G!Gcat -s Message-ID: <2689@wn1.sci.kun.nl> Date: 24 Jan 91 14:58:43 GMT References: <1991Jan24.064310.8077@midway.uchicago.edu> Sender: root@sci.kun.nl Organization: University of Nijmegen, The Netherlands Lines: 17 In article chris@bilby.cs.uwa.oz.au (chris mcdonald) writes: >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 Close, but no cigar: it's easier to filter the whole file using 1G!Gcat -s^M That way, you don't have to count lines. And when you must use a line count, it's easier to type !!filter^M Have a nice day, Hans Mulder hansm@cs.kun.nl