User define Language question
-
Hello,
I am trying to have a specific colour for anything starting with $ and finishing by # and starting with $ and finishing by ? I am trying to play with the user define language without lot of success. I am assuming is possible as pre-user SHELL language manage to do it.
I am using the “Operators and delimiters” with Open $ and close #, does not seem we can use several options in the close
Working fine :
But not working
-
No, that does not work. You could use the EnhanceAnyLexer plugin and use two regexes for it.
-
@MURIM-BAUDIN said in User define Language question:
I am assuming is possible as pre-user SHELL language manage to do it.
To clarify, the pre-defined languages are all made with custom code compiled into the Notepad++ source; the UDL are all based on simple text-matching without any wildcard ability or any such “fancy” features. Just because something can be done in a built-in lexer doesn’t mean it can be replicated in UDL.
For anything more complicated than simple text-matching, UDL is not sufficient. You would either need something like a lexer plugin, or have another plugin (like @Ekopalypse’s EnhanceAnyLexer, already mentioned) that could provide an alternative method of doing the highlighting.