Folding in HTML?
-
Hi everyone,
so I was able to figure out, that I can create my own keywords in the “UserDefinedLanguage”.
However,
by adding anything in the “Folding in comment style:” window,
it allows me to fold comments.
But it folds to the very end of my code/text?Also, is it possible to add this folding function into the already existing HTML language?
Thanks in advance
-
But it folds to the very end of my code/text?
For UDL folding in comment, it works just like described at https://ivan-radic.github.io/udl-documentation/folding-in-comment/ , which you can get to from the link in the UDL dialog:
If I make a quick UDL that just defines comments like HTML comments: <!-- this is a comment --> Then I can use Folding in comment style, like described at https://ivan-radic.github.io/udl-documentation/folding-in-comment/ <!-- openFold --> stuff here <!-- middleFold --> blah <!-- closeFold --> outside of folding-in-comment
which if that UDL is active will show up as:
… and then when folded:
Note that the folding begins and ends with the keywords defined.
Also, is it possible to add this folding function into the already existing HTML language?
You cannot combine folding from a UDL and folding in a builtin syntax highlighter like HTML, sorry. Only one lexer – either UDL or a builtin – can be active at a time.
-
This post is deleted!