[Gllug] VIM comment stripping

Wulf Forrester-Barker wulf.f-b at uhl.nhs.uk
Fri Jan 4 12:15:31 UTC 2002


JD <jonathan.dye at automationpartnership.com> asked:

> How can I convert:
>
> >> >Some forwarded
> >> >message
>
> into:
>
> >Some forwarded message
>
> in VIM?

:% s/>> >/>/

will turn the mess of quote markers to something neater (% specifies
the whole document, and the s/>> >/>/ will replace the first instance of
input string on each line with the output string (adding g to the end
would replace every instance of >> > with >)

Then, with the cursor in the paragraph, type gqap, and the whole
paragraph will be formatted to vims current width (although I assume you
could specify the text width... set textwidth=70?).

Wulf



wulf.f-b at uhl.nhs.uk 

**********************************************************************
DISCLAIMER:

Any opinions expressed in this email are those of the individual and
not necessarily the Trust. This email and any files transmitted with
it are confidential and intended solely for the use of the individual
or entity to whom they are addressed. Any unauthorised disclosure of
the information contained in this e-mail is strictly prohibited.

The contents of this email may contain software viruses which could
damage your own computer system. Whilst we have taken every
reasonable precaution to minimise this risk, we cannot accept liability
for any damage which you sustain as a result of software viruses.
You should therefore carry out your own virus checks before opening
the attachment.

If you have received this email in error please notify the sender or
postmaster at uhl.nhs.uk. Please then delete this email.

University Hospital Lewisham
Tel: 020 8333 3000
Web: www.uhl.ac.uk 
**********************************************************************


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list