I love the Markdown folding in TextMate 2.
Just one thing: at the moment, headings, sub-headings, sub-sub-headings, are not nested in their folding.
It would be great if folding, say, a Level 1 heading (#) also folded all of its sub-headings (##), sub-sub- headings (###), etc. under that heading. It woudl be nice if the folding structure mirrored the (nested) structure of headings of the document.
Would it be possible to implement this in TextMate 2’s Markdown, and is it at all on the horizon?
Not currently possible: There’s no “end” marker for a heading section in md, so the folding settings work by opening a fold on ^#.*$, then ignoring non-heading lines...
To get nested headings, one would need TM to have a concept of levels of fold.
Then you could set a fold level on each heading #{1}, which would create nesting
On 25 Sep 2012, at 2:28 PM, Mark S sprevak.home@gmail.com wrote:
I love the Markdown folding in TextMate 2.
Just one thing: at the moment, headings, sub-headings, sub-sub-headings, are not nested in their folding.
It would be great if folding, say, a Level 1 heading (#) also folded all of its sub-headings (##), sub-sub- headings (###), etc. under that heading. It woudl be nice if the folding structure mirrored the (nested) structure of headings of the document.
Would it be possible to implement this in TextMate 2’s Markdown, and is it at all on the horizon?
On Sep 25, 2012, at 3:28 PM, Mark S sprevak.home@gmail.com wrote:
[…] Would it be possible to implement this in TextMate 2’s Markdown, and is it at all on the horizon?
I think Tim already answered this one, but it would require another way to tell TextMate about foldings, one that would communicate how the headings nest, which I don’t see done using only a declarative system.