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.
    • Juan Pablo BollettaJ
      Juan Pablo Bolletta
      last edited by

      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!

      Claudia FrankC 1 Reply Last reply Reply Quote 2
      • Claudia FrankC
        Claudia Frank @Juan Pablo Bolletta
        last edited by

        @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
        • Juan Pablo BollettaJ
          Juan Pablo Bolletta
          last edited by

          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.

          Claudia FrankC 1 Reply Last reply Reply Quote 2
          • Claudia FrankC
            Claudia Frank @Juan Pablo Bolletta
            last edited by

            @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
            • Juan Pablo BollettaJ
              Juan Pablo Bolletta
              last edited by

              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?

              Claudia FrankC 2 Replies Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @Juan Pablo Bolletta
                last edited by

                @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
                • Claudia FrankC
                  Claudia Frank @Juan Pablo Bolletta
                  last edited by

                  @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
                  • Juan Pablo BollettaJ
                    Juan Pablo Bolletta
                    last edited by

                    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
                    • Gogo NeatzaG
                      Gogo Neatza
                      last edited by

                      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.

                      Scott SumnerS 1 Reply Last reply Reply Quote 0
                      • Scott SumnerS
                        Scott Sumner @Gogo Neatza
                        last edited by

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