Community
    • Login

    New UserDefinedLang - colorizing keywords but not params

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 825 Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              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 Offline
                Ekopalypse
                last edited by

                LOL :-D

                1 Reply Last reply Reply Quote 0

                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
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors