Just downloaded TextMate today after searching high and low for a text editor for OS X that has folding. I didn't realize it was a such a sought-after but generally unavailable feature. I've been hand-coding in Dreamweaver, which i like for its auto-complete and hints, but beyond that I haven't really had much luck marrying HTML and PHP in its framework.
Anyway, to my questions, and thanks for bearing with me as I explore Text Mate, which looks great. If it's as good as I think it's going to be, I'll gladly pony up cash for TM.
As far as I can tell, Text Mate won't "remember" code blocks that you've marked for folding unless you change something in the plist files with the respective syntax bundles. Yes? (I was surprised that I could fold up lots of code, save the file, and then lose all of my foldings when I reoped the file. At first I thought this was because I hadn't put the file into a project and saved the whole project.)
Anyway, I basically have no idea what I'm doing. Is there some easy way of specifying the the opening and closing expressions for folding? Does this require that you have a good understanding of regular expressions?
I started out viewing my code with HTML (PHP) syntax, which automatically recognizes some tag structures. When I switched to PHP syntax, which I like better, it doesn't seem to recognize anything at all. How does one add or modify the plist information so that TM will "remember" that I folded blocks such as:
<?php ... ?>
or even
<form> ... </form>
?
Thanks for any help you can provide. Sorry to be so verbose.
Chas
On 12. feb 2005, at 0:24, Experiments wrote:
As far as I can tell, Text Mate won't "remember" code blocks that you've marked for folding unless you change something in the plist files with the respective syntax bundles. Yes? (I was surprised that I could fold up lots of code, save the file, and then lose all of my foldings when I reoped the file. At first I thought this was because I hadn't put the file into a project and saved the whole project.)
In general, state is not remembered in TM. This has also been discussed with respect to bookmarks (which aren't saved either). When the project system is slightly revised, I think this will be taken into account, but I am not sure decisions are made on it so far.
Anyway, I basically have no idea what I'm doing. Is there some easy way of specifying the the opening and closing expressions for folding? Does this require that you have a good understanding of regular expressions?
Yes, those are specified for each language, but indentation level also plays in. I'll have to pass on answering this one more detailed, as I haven't messed with it too much myself :-/.