Open scoavoux opened 9 years ago
I believe that folding is already implemented in Sublime 3, as I have it natively with Python. I think it is a matter of modifying the syntax file, not writing a plugin.
See "foldingStartMarker" and "foldingStopMarker" syntax keys : https://sublimetext.userecho.com/topic/19281-syntax-code-folding/
it does seem to exist, though it does not appear in the new syntax documentation. However, the problem is recursion : SmartMarkdown allows nested foldings (where folding a level 1 heading folds every other foldable regions inside). I'm not sure this is possible with built-in folding : it will just fold the text up to the next title, but we want it to fold it to the next title of the same level.
How about we wait for the syntax do-over, in case nested folding is then available. If not, we will need SmartMarkdown.
Allow line folding / unfolding at headings, like SmartMarkdown : https://github.com/demon386/SmartMarkdown/blob/master/smart_folding.py