Configure the styler to hightlight text
-
Hello
I have the following code
Area:ServiceFront { Area:ServiceBack = 123123 }
How to setup the styler to have a specific color for any text after “:” and till “=” or wightspace or EOL in this example?
-
“Until EOL” is easy: DELIMITERn open =
:
, close =((EOL))
Unfortunately, stop-on-other-whitespace is harder; not sure how it could be done natively in a Notepad++ UDL.There are two alternatives that I can think of:
- just define it as a delimiter with
((EOL))
closing it, but set the STYLE for that delimiter to allow nesting of anything else (that you have defined). For example, if=
was defined in Operators 2 as magenta, Number defined with blue foreground and cyan background, Keywords 1 defined as Green/Bold withArea
as the keyword, and DELIMITER1 defined with open =:
, close =((EOL))
and foreground=red, bg=yellow, nesting=operators2+numbers, I see:
which might be enough for you.
- Otherwise, you can add extra highlighting to a UDL language using regexes via the script
EnhanceUDLLexer.py
that @Ekopalypse shares in this linked post
- just define it as a delimiter with