[TxMt] Re: TextMate 2 HTML folding

Allan Odgaard mailinglist at textmate.org
Sat Nov 2 12:53:57 UTC 2013


On 29 Oct 2013, at 02:14, Linda Nguyen <skoryky at gmail.com> wrote:

> I just upgraded to TextMate 2, and noticed that script and style tags don't fold. The HTML bundle settings for folding seem sensible, so not sure why this doesn't work.

For 2.0 we have made folding patterns settable per scope.

The issue here is that the entire line with the <script> tag is scoped as source.js so it gets the folding patterns setup for JavaScript (not HTML).

The easy fix is to move the matching of <script> to the folding settings in the JavaScript bundle, the more involved fix would be to scope the <script> (and <style>) tags “properly” — I think this is something Michael have been meaning to do for some time, but it’s a little tricky because the current scoping is actually to make themes look good (when they change background color of the embedded code and want to include the tags).



More information about the textmate mailing list