Peng Yu wrote:
Hi,
I have the following file segments. I want to concatenate all the
lines with their next lines, except that it ends with "}}". I want to
use the pattern "\(}}\)[EMAIL PROTECTED]". It seems not working.
Would you please help me to figure out how to match the lineend without
"}}"?
Thanks,
Peng
To join every line not ending in }} with the following line, use the ":j[oin]"
command on every line _not_ matching the pattern /}}$/ which means "two
closing braces at end of line". As a cherry on the cake, you can avoid joining
the last line in the file (which has no following line):
:1,$-1v/}}$/j
See
:help multi-repeat
:help :join
Best regards,
Tony.