• Login
Community
  • Login

user-defined syntax highlighting

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 484 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.
  • N
    Ninon_1977
    last edited by Feb 19, 2020, 11:02 AM

    Hi there :-)
    I have two questions regarding the user-defined syntax highlighting…

    1. I want to highlight all numbers - at the moment only positive numbers are highlighted…
    2. I want to highlight specific keywords (and just these keyword) when a specific second keyword is in front of the first keyword…
      Any comments are welcome!
      Thank you!
    E 1 Reply Last reply Feb 19, 2020, 12:26 PM Reply Quote 1
    • E
      Ekopalypse @Ninon_1977
      last edited by Feb 19, 2020, 12:26 PM

      @Heike-von-Waaden

      numbers should already work out of the box

      747041fb-1723-4cd3-9cd0-cff3e9ac5d74-image.png

      but the second request, afaik, can’t be done with udl only.
      A possible solution has been offered here.

      1 Reply Last reply Reply Quote 1
      • N
        Ninon_1977
        last edited by Feb 19, 2020, 3:00 PM

        Hi,

        thank you very much for your answer.
        I think I didn’t described the issue proberly. Negative numbers are highighted, but not the ones without an zero at the beginning, e.g.:

        -.809401

        Do you have any idea?

        BG,
        Heike

        E 1 Reply Last reply Feb 19, 2020, 3:16 PM Reply Quote 0
        • E
          Ekopalypse @Ninon_1977
          last edited by Feb 19, 2020, 3:16 PM

          @Heike-von-Waaden

          You are correct, in that case numbers aren’t colored.
          Beside the tip with your other problem, you could
          use -(minus) as an operator or defining a delimiter
          with start with -(minus) and ends with .(dot)
          and, for both, having the same color as numbers.
          Not sure if this works for you.

          1 Reply Last reply Reply Quote 2
          • N
            Ninon_1977
            last edited by Feb 19, 2020, 3:38 PM

            Thank you!
            It works when I define operator 1 as follows: -.
            :-)

            BG,
            Heike

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