[TxMt] Re: TM2: Folding in plain text files

Allan Odgaard mailinglist at textmate.org
Sun Feb 19 11:17:44 UTC 2012


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).



More information about the textmate mailing list