[TxMt] folding perl pod?
Michael Reece
mreece at vinq.com
Thu Jul 6 22:21:48 UTC 2006
i am trying to convince the perl bundle to properly fold pod
documents. has anyone tried this with success?
i have tried modifying the Start/Stop markers from
foldingStartMarker = '(/\*|(\{|\[|\()\s*$)';
foldingStopMarker = '(\*/|^\s*(\}|\]|\)))';
to
foldingStartMarker = '(/\*|(\{|\[|\()\s*$|^=head\d)';
foldingStopMarker = '(\*/|^\s*(\}|\]|\))|^=cut)';
which works fine for a simple block:
=head1 HELLO
Hello, World.
=cut
but not for blocks that have more than one =head marker:
=head1 HELLO
Hello, World.
=head2 OOPS
Now head1 and head2 both show folding carets, but only the one
one by head2 does anything when you click it.
=cut
i tried to get clever and use perlish zero-width positive look-ahead
regex -- something like (^=head\d(.|\n)*(?==cut)) -- but textmate
doesn't appear to support such patterns.
any suggestions?
More information about the textmate
mailing list