Ah, I was going to try the first method, but I could not find a button or menu option anywhere to create a new item, and did not know that ⌘N would do it. Am I missing the GUI element for this, or does it not exist?

Indent-based folding would be ideal, and headers even better. I read the patch notes multiple times and did a great deal of searching, but never found anything that explained it in enough detail for me to do anything with it.  Knowing where to look (Markdown -> Settings -> Folding) definitely helps, and hopefully more comprehensive, up to date TM2 & bundle documentation is coming so that I can RTFM rather than bugging the mailing list. :)

In any case, it seems that the best way to accomplish my goal is to convert all of my text files to markdown and my brace-delimited blocks into indented blocks. The only method I can think of is to write a regexp and tediously pick through my files searching and replacing, then saving each one as markdown. Unless anyone else has a better suggestion..?

Thanks,
--
Megan Nix Nissen
Techcycled (formerly Girl Geek Boutique )
Recycled technology transformed into artisan jewelry, accessories, and unique gifts


On 2/19/12 3:17 AM, Allan Odgaard wrote:
On 18/02/2012, at 02.42, Megan Nix Nissen wrote:

Is there a way to implement folding in plain text files in TM2?
Yes, add folding patterns to the text.plain scope.

In the bundle editor use ⌘N to create a new Settings item, set scope selector to text.plain and the content should set foldingStart/StopMarker. You can look e.g. in C → Settings → Foldings for how the C sets this up, although you can simplify these patterns if you only want to fold on braces.

Also Markdown bundle sets foldings for headings, which is using the new indent-based folding patterns explained in the release notes (the start/stop marker is explained in the manual, but has been deprecated to have in grammars, and should instead be done as scoped settings).


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate

--