• Login
Community
  • Login

Need help defining my own language

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
10 Posts 4 Posters 2.3k 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.
  • J
    Juan Pablo Bolletta
    last edited by May 3, 2018, 5:30 PM

    Hello, I’m trying to make my own language. It is for the text input for a specific program, where the number 1.00 has special significance. I would like to highlight it whenever it appears no matter the context. Sometimes it has a prefix (other numbers) sometimes it doesn’t.

    Any clues on how to do this? I have tried putting 1.00 as operator 1, but it only works when it has something before, such as in 21.00, but not with 1.00

    Thanks!

    C 1 Reply Last reply May 3, 2018, 5:34 PM Reply Quote 2
    • C
      Claudia Frank @Juan Pablo Bolletta
      last edited by May 3, 2018, 5:34 PM

      @Juan-Pablo-Bolletta

      sorry not 100% clear to me, you only want to color 1.00 or 21.00 as well?

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 1
      • J
        Juan Pablo Bolletta
        last edited by May 3, 2018, 5:52 PM

        I want to color 1.00 when it appears as 1.00 and also when it appears as xx1.00, being x anything. All instances of 1.00 regardless of context.

        C 1 Reply Last reply May 3, 2018, 6:00 PM Reply Quote 2
        • C
          Claudia Frank @Juan Pablo Bolletta
          last edited by May 3, 2018, 6:00 PM

          @Juan-Pablo-Bolletta

          sorry, seems I wasn’t clear - I got that you want to color 1.00 - what I don’t know
          is about the 21.00. Should the whole decimal be colored or only 1.00 and 2 being left
          with the default color of the text.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 2
          • J
            Juan Pablo Bolletta
            last edited by May 3, 2018, 6:02 PM

            Oh, sorry, maybe I misunderstood. It is the same, both will work for what I want to do.

            Can you tell me how to do both, then I will pick what works better for the users?

            C 2 Replies Last reply May 3, 2018, 6:04 PM Reply Quote 0
            • C
              Claudia Frank @Juan Pablo Bolletta
              last edited by May 3, 2018, 6:04 PM

              @Juan-Pablo-Bolletta

              ok - let me think about it - I guess this easy task isn’t easy solvable.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 1
              • C
                Claudia Frank @Juan Pablo Bolletta
                last edited by May 3, 2018, 7:44 PM

                @Juan-Pablo-Bolletta

                sorry - but it looks like udl doesn’t support this at the moment.

                The native workarounds I see are macro and mark feature from find dialog
                or using style token feature but this involves manual execution.

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 2
                • J
                  Juan Pablo Bolletta
                  last edited by May 3, 2018, 8:09 PM

                  OK, I will keep using the current version that highlights 1.00 when it has something immediately before. Thank you for your time!

                  1 Reply Last reply Reply Quote 2
                  • G
                    Gogo Neatza
                    last edited by May 4, 2018, 4:28 AM

                    Use Notepad++ with the RegEx Helper plugin.

                    Using in the plugin this expression “(\d{2,3}.00)|(1.00)”
                    the plugin will match and highlight things like 1.00 , x1.00 or xx1.00 anywhere in the current file.

                    S 1 Reply Last reply May 4, 2018, 12:28 PM Reply Quote 0
                    • S
                      Scott Sumner @Gogo Neatza
                      last edited by May 4, 2018, 12:28 PM

                      @Gogo-Neatza said:

                      Use Notepad++ with the RegEx Helper plugin

                      A downside there is that the RegEx Helper has to be manually activated upon every run of Notepad++, and that regex entered into its UI again. At least that my understanding of that plugin.

                      Seems like the OP would like something more “automatic”.

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