Community
    • Login

    Configure the styler to hightlight text

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 594 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.
    • The gods' almighty willT Offline
      The gods' almighty will
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones
        last edited by PeterJones

        “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:

        1. 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 with Area as the keyword, and DELIMITER1 defined with open = :, close = ((EOL)) and foreground=red, bg=yellow, nesting=operators2+numbers, I see:
          7f97a779-14f3-4046-b719-3abb641fdf54-image.png
          which might be enough for you.
        1. Otherwise, you can add extra highlighting to a UDL language using regexes via the script EnhanceUDLLexer.py that @Ekopalypse shares in this linked post
        1 Reply Last reply Reply Quote 1

        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