I have not found any documentation on how folding works. From what I can tell it is a combination of character pairs and indentation. I'm have great stress trying to make sense of a PHP class which I did not write. I cannot make sense of it in BBEdit which I have always used for code. (I stumbled on TextMate today.) TM would help greatly with it's folding feature, if I could properly fold functions. However the class author used inconsistant indentation (for which he should be tortured) which is causing folds to begin with the { of a function declaration and the } of an if clause. I have checked using BBEdit's Text>Balance feature (which is very cool and should be added to TM) and the {'s and }'s are properly balanced. But, since the indentation sucks, I can't fold.
Please correct the folding behavior.
Thank you,
--==<< R i c h a r d B r o n o s k y >>==--
On Thu, 3 Feb 2005 17:04, Bruno Bronosky wrote:
I have not found any documentation on how folding works. From what I can tell it is a combination of character pairs and indentation.
folding is defined by patterns in the syntax-highlighting files, you could change it there by adjusting the foldingStartMarker and foldingStopMarker expressions. (you can find the highlight definitions in the bundles in /Applications/TextMate/Contents/SharedSupport/Bundles/ and ~/Libary/Application Support/TextMate/Bundles/ )
the best way probably would be to copy the php bundle to your custom bundle folder (mentioned above) and then tweak the syntax definition if you need a custom folding. if you make it also useful for normal cases sending a patch to justin french (who afaik maintains the bundle) would also help other people. i think the email should be anywhere in the list archives, the wiki or elsewhere on the internet.
-- Torsten Becker