Stylers.xml / lang.xml
-
Re: Extend syntax highlighting for a certain language
Refering to the above post I am trying to figure out a way to fold on a #if( to #end by adding lines to one of the above files.
Has anyone tried this?
Thank you for your support.
Bernd
-
to one of the above files.
That’s not very specific, even when I go back and re-skim the discussion from 2.5 years ago.edit: Oh, I realized you meant thestylers.xml
andlang.xml
from your subject line, not some random files mentioned years ago; the rest of my post (below) still applies.If you are using a built-in language, you cannot “add folding” in any meaningful way (update: if there’s already a list of folding keywords for your language in the Style Configurator, then either adding your terms to the list would work; but I don’t remember there being any built-in languages that list their folding-keywords in the style configurator). To get different folding than the native language-processor’s folding, you would have to manually create a new UDL that incorporates some of the features of that language, and then use your UDL instead of the built-in language for highlighting and folding your source code.
If you are using a UDL already, then just add the #if/#end keywords to the folding pairs (probably folding-in-code2 style, or maybe folding-in-comment style, depending on if there’s more meaning to the # prefix or not).
But without more details about your specific situation, these vague statements are the best I can do.
-
Hi Peter,
thx for your reply! I already tried some of the tricks you provided, but I overlooked one that I will try this weekend.
Will post the resultRegards Bernd