[Linux-disciples] vim: selecting lines matching a pattern

Adam Rosi-Kessel adam at rosi-kessel.org
Thu Dec 22 15:18:24 EST 2005


Stephen R Laniel wrote:
> I'd like to find everything between <p> and </p> and join
> all those lines in vim. What would be the easiest command to
> do that? Certainly 'J' will be involved, but other than that
> I'm a little puzzled.

Between every <p> and </p> in the whole document, or just the one you are
currently "in"? It might be a little easier to do with, e.g., a sed pipe.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20051222/8d0ffa14/signature.pgp


More information about the Linux-disciples mailing list