Community
    • Login

    New UserDefinedLang - colorizing keywords but not params

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 364 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gibberishbcG
      gibberishbc
      last edited by

      NPP version: 7.7.1
      UDL ver 2.1.0.12

      I 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.

      dinkumoilD EkopalypseE 2 Replies Last reply Reply Quote 0
      • dinkumoilD
        dinkumoil @gibberishbc
        last edited by

        @gibberishbc

        You have to define the parenthesis as operators.

        In UDL dialog got to (register) Operators & Delimiter -> Operators 1 and add ( and ) (separated by space character).

        See also >>> here <<< and >>> here <<< to read extensive documentation of the UDL feature.

        EkopalypseE 1 Reply Last reply Reply Quote 1
        • EkopalypseE
          Ekopalypse @gibberishbc
          last edited by

          @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…

          1 Reply Last reply Reply Quote 1
          • EkopalypseE
            Ekopalypse @dinkumoil
            last edited by Ekopalypse

            @dinkumoil

            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

            dinkumoilD 1 Reply Last reply Reply Quote 0
            • dinkumoilD
              dinkumoil @Ekopalypse
              last edited by

              @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. ;-)

              1 Reply Last reply Reply Quote 2
              • EkopalypseE
                Ekopalypse
                last edited by

                LOL :-D

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors