On Tuesday, August 11, 2020 at 5:28:44 PM UTC-5 Edward K. Ream wrote:

> The code is a labyrinth...It's time for a break.

I googled "vs code folding" and found this manual page 
<https://code.visualstudio.com/docs/editor/codebasics#_folding>, containing 
this quote:

QQQ
Folding regions are by default evaluated based on the indentation of lines. 
A folding region starts when a line has a smaller indent than one or more 
following lines, and ends when there is a line with the same or smaller 
indent. 

Since the 1.22 release, folding regions can also be computed based on 
syntax tokens of the editor's configured language. The following languages 
already provide syntax aware folding: Markdown, HTML, CSS, LESS, SCSS, and 
JSON.

If you prefer to switch back to indentation-based folding for one (or all) 
of the languages above, use:
"[html]": { "editor.foldingStrategy": "indentation" },
QQQ

This explains a lot :-) It's a disappointingly simple strategy, one that I 
never would have considered. Or maybe it's just a brilliantly simple 
strategy.  Hehe, probably not. It creates too many folding units. They 
don't matter much in vs code, but they would not be welcome in Leo. Leo's 
importers can't use this strategy.

*Summary*

Today's explorations have been useful. They have taught me vs code's 
searching capabilities.

vs code's documentation explains the clever way that vs code discovers 
folding units. It is independent of language!

Alas, this clever approach will be of no use to Leo's importers. Imo, the 
importers must know more about language syntax than indentation.  I plan no 
further explorations in this area.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/28737b29-0eb2-46a3-9cea-792a7c01d3dan%40googlegroups.com.

Reply via email to