• Login
Community
  • Login

Creating a new coloring matching character

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
15 Posts 3 Posters 2.5k 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.
  • B
    BigMat Lecircuit
    last edited by Aug 1, 2019, 1:50 PM

    Hello,

    NP++ conveniently color-codes matching pair of characters like round, box or curly brackets.
    Example:
    [img]https://i.imgur.com/5beWtkq.png[/img]

    I’d like the same feature for more characters: pair of double-quotes and angled brackets.
    example for double quotes:
    [img]https://i.imgur.com/miJtJ9a.png[/img]

    is that user configurable?

    Cheers,
    BM

    A 1 Reply Last reply Aug 1, 2019, 2:20 PM Reply Quote 1
    • A
      Alan Kilborn @BigMat Lecircuit
      last edited by Alan Kilborn Aug 1, 2019, 2:21 PM Aug 1, 2019, 2:20 PM

      @BigMat-Lecircuit

      See https://notepad-plus-plus.org/community/topic/18018/highlighting-matched-single-and-double-quotes for recent discussion of that very thing.

      1 Reply Last reply Reply Quote 1
      • B
        BigMat Lecircuit
        last edited by Aug 1, 2019, 3:05 PM

        they seem to argue about whether it’s even possible to nest quotation marks due to the difficulty of identifying what character opens and close the pair.
        Nevertheless, this problem shouldn’t apply angled brackets. Those should be just as hard to identify as round brackets.

        But is it even user-configurable but is it in the code of NP++ itself?

        A 1 Reply Last reply Aug 1, 2019, 3:08 PM Reply Quote 0
        • A
          Alan Kilborn @BigMat Lecircuit
          last edited by Aug 1, 2019, 3:08 PM

          @BigMat-Lecircuit

          Ah, sorry, I didn’t read your original posting well enough. It does not appear that angled brackets are easily configured to behave like brackets or braces.

          1 Reply Last reply Reply Quote 0
          • E
            Ekopalypse
            last edited by Aug 2, 2019, 12:15 PM

            This seems strange, as scintilla core and npp do support angled brackets but, at least, in npp it doesn’t seem to work as expected. Maybe a bug !?

            A 1 Reply Last reply Aug 2, 2019, 12:24 PM Reply Quote 2
            • A
              Alan Kilborn @Ekopalypse
              last edited by Aug 2, 2019, 12:24 PM

              @Ekopalypse

              OP is talking only about coloring.

              What you cited (both references) is for the on-demand brace-matching feature (Search > Go to Matching Brace).

              But I think you are right; from the N++ code it appears angled brackets are supported, but the go-to-matching feature is not enabled when near an angled bracket.

              E 1 Reply Last reply Aug 2, 2019, 12:44 PM Reply Quote 2
              • E
                Ekopalypse @Alan Kilborn
                last edited by Aug 2, 2019, 12:44 PM

                @Alan-Kilborn

                from the images I got the impression that OP is referring to colors used by matching braces functionality but I might be wrong.

                A 1 Reply Last reply Aug 2, 2019, 12:47 PM Reply Quote 0
                • A
                  Alan Kilborn @Ekopalypse
                  last edited by Aug 2, 2019, 12:47 PM

                  @Ekopalypse said:

                  from the images

                  I think the images are inconclusive on that point; I thought the OP was talking about just careting over an opening or closing brace/bracket and seeing the match be color-highlighted. Perhaps if the OP meant the on-demand feature he would have thought it important enough to mention? Or, I’m totally wrong. :)

                  E 1 Reply Last reply Aug 2, 2019, 12:49 PM Reply Quote 1
                  • E
                    Ekopalypse @Alan Kilborn
                    last edited by Aug 2, 2019, 12:49 PM

                    @Alan-Kilborn

                    Or, I’m totally wrong. :)

                    … or both of use :-D

                    1 Reply Last reply Reply Quote 1
                    • B
                      BigMat Lecircuit
                      last edited by BigMat Lecircuit Aug 5, 2019, 9:53 PM Aug 5, 2019, 9:52 PM

                      When I place the cursor right before or after an angle bracket (felt or right), I wanted NP++ to bold and color both angle brackets, assuming it finds the other side of the pair.
                      just like with curly brackets

                      E 1 Reply Last reply Aug 5, 2019, 10:27 PM Reply Quote 1
                      • E
                        Ekopalypse @BigMat Lecircuit
                        last edited by Aug 5, 2019, 10:27 PM

                        @BigMat-Lecircuit

                        I tried a few things but I guess this is a bug.
                        You might consider open an issue here .

                        1 Reply Last reply Reply Quote 0
                        • B
                          BigMat Lecircuit
                          last edited by Aug 6, 2019, 8:25 AM

                          Hi,

                          and how shall I call this feature, so that the developer understand what I mean?
                          If this thread is of any indication, it seems I’m having trouble explaining what I wanted!

                          Thanks to all for help and feedback

                          E 2 Replies Last reply Aug 6, 2019, 11:49 AM Reply Quote 0
                          • E
                            Ekopalypse @BigMat Lecircuit
                            last edited by Aug 6, 2019, 11:49 AM

                            @BigMat-Lecircuit

                            It is called brace matching, I’m going to open an issue.

                            1 Reply Last reply Reply Quote 0
                            • E
                              Ekopalypse
                              last edited by Aug 6, 2019, 12:22 PM

                              Issue opened

                              1 Reply Last reply Reply Quote 1
                              • E
                                Ekopalypse @BigMat Lecircuit
                                last edited by Ekopalypse Aug 7, 2019, 7:36 PM Aug 7, 2019, 7:35 PM

                                @BigMat-Lecircuit

                                there was a decision made long time ago that the angled bracket matching isn’t part of the builtin matching function
                                as too much languages do use angled brackets as operators, which then would falsely color those operators.

                                At the moment I do see two options for you.

                                1. Open a feature request at github and define exactly how you want it to behave and for which languages (which itself shouldn’t use angled brackets as operators in their syntax) or
                                2. Use one of the plugin scripting languages and make it as a feature for you.
                                1 Reply Last reply Reply Quote 0
                                5 out of 15
                                • First post
                                  5/15
                                  Last post
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors