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

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


Stephen R Laniel wrote:
> On Thu, Dec 22, 2005 at 03:18:24PM -0500, Adam Rosi-Kessel wrote:
>> 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.
> Every <p>...</p> in the whole document.
> How would I do it in sed?

I was going to leave that as an exercise for the reader. :)

I always forget sed syntax, but there is a way to specify a range based on
regexps, and then specify an operation on that range, which I believe could
include a 'join' type operation. I'd have to muck around in the sed manpage
for a while to get the syntax right, though.

-------------- 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/2f93b237/signature.pgp


More information about the Linux-disciples mailing list