darren chamberlain wrote [020402 17:15]:
> Quick question (hopefully):
> I just grabbed a file from a mailing list archive which has lines longer
> than 72 characters terminated with "+" and wrapped to the next line.
> The file is 600 lines long, and most of the lines have these
> continuations. How can I quickly join the lines?
> /=$ matches the pattern; I want to do, basically:
> :%s/=$/shift j
> But how do I do the shift-J on the right hand side?
You mean something like
(for each line that ends in "=", apply the "join" command)?
Of course, you should decide whether you mean "+" or "=" in the
first place :-)
Now, when you have several lines ending in "+" (I go for that one
for the moment), you might need
(So, whenever you find a line that ends in a "+", start a range
from that line (".") to the next end that doesn't end in "+" and
join that range completely.
Of course, this doesn't get rid of the "+" itself...
If you want that, you might want to give
Thomas Köhler Email: jean-luc@...
| LCARS - Linux
<>< WWW: http://jeanluc-picard.de
| for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships