Closed PyvesB closed 6 years ago
Hello @PyvesB
normally I do not like code folding at all, but I often did not get all necessary information at one glance, but for yaml files It could be worthful because mostly there is too much information on screen.
So I will give it a try...
Hmm... a good Howto article found at https://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
After long time having problems with nested foldings (I thought it would not be supported by standard behaviour) it turned out that it can work.
Example snippet from feature-branch try out:
Dummy text:
a23456789:
b23456789:
c23456789:
d23456789:
e23456789:
f23456789:
g23456789:
with folding positions defined as
SortedSet<FoldingPosition> positions = model.getFoldingPositions();
positions.add(new FoldingPosition(10,60-10));
positions.add(new FoldingPosition(30,50-30));
turns out as
So
Yaml entry folding should work then when the "3 line must" strategy is used: Example
a:
b1:
c1:
c2:
c3:
b2:
c4:
c5:
d:
e:
folding of a must contain line of d: to prevent double icons for b2: or c5
Thanks for documenting and sharing your findings!
Hmm.. I should give this attention again - but currently I am very busy...
Here an example:
Nice! Looking forward to testing this in the next release. 👍
Your are welcome :-)
Just released 1.0.0 on marketplace containing folding...
Just installed the update, everything seems to work as expected. Awesome job!
Hello @de-jcup,
Nice plugin! Just a quick suggestion: it would be great if the plugin could allow folding of indented blocks and lists. 😉
Thanks,
Pyves