RE: [suse-linux-uk-schools] Silly question...
Sadly, the answer I was looking for was "dd"... But the macro is cool too :-) -----Original Message----- From: Gary Stainburn To: Chris Puttick; 'suse-linux-uk-schools@suse.com' Sent: 6/5/02 3:44 PM Subject: Re: [suse-linux-uk-schools] Silly question... On Wednesday 05 June 2002 3:34 pm, Chris Puttick wrote:
Ok, this has been bugging me for a while, and is probably obvious, but: using VI, how do you remove blank lines, i.e. carriage returns/paragraph marks? Editting a big alias file has brought this to a head...
Cheers
Chris
Hi Chris, The way I do it is to record/playback a little macro. Below is the macro and a description (bit before tab = macro, bit after tab = description, <cr> = enter key) qq record macro 'q' /^$<cr> search for next blank line dd delete it q end recording macro 999@q replay macro 'q' 999 times. The macro stops at the first error, i.e. the first time it can't find a blank line. -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
participants (1)
-
Chris Puttick