On 7/7/2006, at 0:21, Michael Reece wrote:
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.
The pattern is only applied to a single line, so that’s why it won’t see =cut. However, both =head1 and =head2 would have seen =cut, if TM had given it the entire document.
As I see it, the only way is to decide which head level you want folding start markers, and ask explicitly for that, i.e. ^=head1$.