New UserDefinedLang - colorizing keywords but not params
-
NPP version: 7.7.1
UDL ver 2.1.0.12I am creating a user-defined-language and am unsure how to work the keyword custom colorization.
As with most languages, I wish to colorize the built-in functions (such as Message(), AskLine(), ArrInfo(), etc). There are several hundred such keywords/functions to colorize.
However, the parentheses are not delimiting the function parameters from the function name. That is, the functions are not being colorized unless I click the “Prefix Mode” checkbox – but then the parentheses themselves and the parameters inside are also colorized.
Am I missing something obvious?
Example:
Message(“Title of alert”, “Text for alert”)Either none of the above is colorized, or (if I turn on Prefix Mode), the entire line is colorized. Desired behavior is that only the keyword Message should be colorized.
-
You have to define the parenthesis as operators.
In UDL dialog got to
(register) Operators & Delimiter -> Operators 1and add(and)(separated by space character).See also >>> here <<< and >>> here <<< to read extensive documentation of the UDL feature.
-
@gibberishbc said in New UserDefinedLang - colorizing keywords but not params:
Message(), AskLine(), ArrInfo()
Define
(and)as open and closing delimiter using the default colors
and allow nesting with keywords etc… -
you posted 2 minutes before me BUT I’m 100% sure that there was nothing when I posted, how could this be??
I mean, I know that we could have answered simultaneously but I always check
if my answer is placed correctly and, as said, I didn’t see your response to OP.
Strange.EDIT: Maybe I need more coffee :-D
-
@Ekopalypse said in New UserDefinedLang - colorizing keywords but not params:
EDIT: Maybe I need more coffee :-D
STOP! I think it’s the new forum software which seems to be very buggy. Dont’t drink a coffee whenever an error occurs, you are going to ruin your body. ;-)
-
LOL :-D
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login