Mailinglist Archive: opensuse-edu (132 mails)

< Previous Next >
RE: [suse-linux-uk-schools] Silly question...
  • From: Chris Puttick <chris@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 5 Jun 2002 14:54:49 +0000 (UTC)
  • Message-id: <02Jun5.154716bst.119042@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxx'
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,
> using VI, how do you remove blank lines, i.e. carriage
> 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
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
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

< Previous Next >
This Thread
  • No further messages