[TxMt] folding perl pod?

Allan Odgaard throw-away-1 at macromates.com
Sat Jul 8 03:23:18 UTC 2006


On 8/7/2006, at 0:04, Michael Reece wrote:

> some sections begin with =head1, some with =head2, some have both  
> =head1 and =head2; but all end with =cut.
>
> so there is no way to come up with folding patterns that will  
> intelligently fold POD sections?  can't have everything, i guess.

No -- for what you want you need to look at lines both above and  
below the current line to decide if the line is a folding marker. If  
TM did that, it would mean that editing a single line would in worst- 
case have to look at every other line in the document. That doesn’t  
scale.

I don’t know how much freedom you have with the POD markers, but you  
could introduce a convention, e.g. trailing space after =head2 makes  
it not a fold marker. That would then allow you to manually exclude  
the problematic folding markers.




More information about the textmate mailing list