Folding Based On Marker Elements
Posted: Fri Apr 04, 2025 11:09 pm
I would like to throw this out there as a feature request that I know I would find useful, and others might as well: the ability to fold content in Text Editor view based on the presence of 'marker' elements. By this I mean, instead of just folding the content of an element (which works great and I love this feature), I would like to be able to fold following siblings into a specific element. For example, I routinely have content that looks like this:
I would love it if I could fold all of the sibling elements that follow each 'marker' element (up to the next occurrence of a 'marker' element), such that they are out of view, and my Text Editor window would then look like this:
Such a feature would need the ability for me to define which elements are marker elements that can be folded on. Or I could possibly see it implemented as an option where any element has the ability to fold in all following siblings until the next occurrence of the specific element used for the folding.
Although my specific use case is different, I could see such a feature also being helpful in an HTML environment, where a document has a bunch of headings, each followed by a collection of p elements and images and tables, etc. The ability to fold all the content out of view, under the heading so to speak, could be useful.
Thanks for any consideration of such a feature!
Code: Select all
<parent>
<a />
<a />
<b />
<marker id="1" />
<a />
<c />
<a />
<marker id="2" />
<b />
<a />
<c />
<a />
<b />
<marker id="3" />
<b />
<c />
<a />
<marker id="4" />
<b />
<a />
<a />
</parent>
Code: Select all
<parent>
<a />
<a />
<b />
<marker id="1" />
<marker id="2" />
<marker id="3" />
<marker id="4" />
</parent>
Although my specific use case is different, I could see such a feature also being helpful in an HTML environment, where a document has a bunch of headings, each followed by a collection of p elements and images and tables, etc. The ability to fold all the content out of view, under the heading so to speak, could be useful.
Thanks for any consideration of such a feature!