Community
    • Login

    [Feature Request] Increase number of delimiters

    Scheduled Pinned Locked Moved General Discussion
    feature request
    11 Posts 5 Posters 883 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.
    • deleeleeD
      deleelee
      last edited by

      In Preferences > Delimiter, it’s only possible to set one delimiter for Ctrl+Mouse double-click. It would be much more user-friendly if this was increased so we can set as many delimiters as we like.

      Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @deleelee
        last edited by

        @deleelee

        And then how would Notepad++ know which delimiter set you intend when you invoke the feature?

        Note also that the Ctrl+doubleclick feature doesn’t work so well when multi-editing is enabled.

        PeterJonesP deleeleeD 2 Replies Last reply Reply Quote 1
        • PeterJonesP
          PeterJones @deleelee
          last edited by PeterJones

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @Alan Kilborn
            last edited by

            @Alan-Kilborn said in [Feature Request] Increase number of delimiters:

            Note also that the Ctrl+doubleclick feature doesn’t work so well when multi-editing is enabled.

            So that explains it. Actually, my experience is that it’s the other way around. I have never intentionally used the Ctrl+double-click feature to select between parentheses… and I had always wondered why when I’m trying to Multi-Edit Ctrl+Double-click that it worked fine when my text was in some sections of code, but not in a function’s parameter list. Now that this discussion has reminded me, it explains why I’ve always had difficulty doing multi-edit whole-word selection inside parameter lists. If I delete those delimiters, now my Multi-Edit works the way I want it to! (I know this doesn’t help @deleelee – sorry – but it’s nice to find out and eliminate the cause of a minor annoyance).

            deleeleeD 1 Reply Last reply Reply Quote 2
            • deleeleeD
              deleelee @Alan Kilborn
              last edited by

              @Alan-Kilborn said in [Feature Request] Increase number of delimiters:

              @deleelee

              And then how would Notepad++ know which delimiter set you intend when you invoke the feature?

              Sorry, I don’t understand. I’m not suggesting we have multiple entries in the Delimiter Open and Close boxes, if that’s what you thought I meant. I mean separate Open and Close entries for different delimiters.

              If the delimiters are set, for example, as ( and ), then Ctrl+Double-Mouse Click selects the contents only within that particular set of ( ) ie: it doesn’t select contents of all sets of ( ). So why can’t we have other sets of delimiters? Like this:

              2023-08-19_150400.png

              Or am I missing something about how the delimiters work?

              PeterJonesP 1 Reply Last reply Reply Quote 1
              • deleeleeD
                deleelee @PeterJones
                last edited by deleelee

                @PeterJones said in [Feature Request] Increase number of delimiters:

                I know this doesn’t help @deleelee – sorry

                No worries, I’m glad I made the post if it helped eliminate “the cause of a minor annoyance” for you 😁👍

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

                  @deleelee said in [Feature Request] Increase number of delimiters:

                  I mean separate Open and Close entries for different delimiters.

                  That’s not necessarily a bad idea. But how many delimiter pairs should Notepad++ allow? Too many, and that Preferences page gets overcrowded; too few, and the next user will come and complain “why does Notepad++ only allow 3? I want to define four delimiter pairs”, and the next will complain “why only 4, why not as many as I want?”.

                  (For example, some might also want <bla bla bla> to work with a Ctrl+DoubleClick, and others might also want smart quotes “bla bla bla” or their native quotes like „bla bla bla“ or «bla bla bla» or 「bla bla bla」…)

                  I actually would suggest that the Open and Close be implemented as two space-separated lists, where the matching pair will be the character in the same position in the list, like:

                  • Delimiters:
                    • Open: ( [ { < «「
                    • Close: ) ] } > » 」

                  … so if you have all of those defined, each of those pairs will behave as a “unit” for the Ctrl+DoubleClick behavior.

                  But no matter how much I like the idea, or how much I quibble with the number of entries available, nothing will happen unless someone makes an official request, as per our FAQ.

                  deleeleeD 2 Replies Last reply Reply Quote 2
                  • deleeleeD
                    deleelee @PeterJones
                    last edited by

                    @PeterJones said in [Feature Request] Increase number of delimiters:

                    I actually would suggest that the Open and Close be implemented as two space-separated lists

                    The only issue I see with this is that some people may want to define ‘unmatched’ delimiters (eg: ( to open and ] to close) and there could be a conflict with them defined in the space-separated list. That’s why I suggested separate entries for each set. I don’t know why anyone would want unmatched delimiters but someone out there is bound to.

                    Victorel PetrovichV 1 Reply Last reply Reply Quote 0
                    • deleeleeD
                      deleelee @PeterJones
                      last edited by

                      @PeterJones said in [Feature Request] Increase number of delimiters:

                      nothing will happen unless someone makes an official request

                      Done!
                      https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14033

                      1 Reply Last reply Reply Quote 0
                      • CoisesC
                        Coises
                        last edited by

                        Would it make more sense to use Scintilla’s brace matching for this instead? As best I can tell, the current delimiter matching logic in Notepad++ is not as sophisticated as what Scintilla uses to match braces for highlighting. What I’m suggesting is to start at the double-clicked position and work forward, backward or outward (not sure which would prove best; intuitively and without thinking hard about it, I think the results would be identical) testing each candidate brace found with SCI_BRACEMATCH (or SCI_BRACEMATCHNEXT) until a match is found which encloses the double-clicked position.

                        A quick test suggests that Scintilla generally knows how to regard quotes, escapes, and so on when matching braces. I don’t know if it makes use of information from the active lexer — the documentation doesn’t say it does, but it doesn’t say it doesn’t, either. I haven’t tested enough to determine whether Scintilla adjusts its understanding of escapes and quotes to match the current language, but my guess is that it would.

                        Perhaps the enhanced function, without the user needing to specify anything, would be more valuable than retaining or extending the current Ctrl+doubleclick behavior?

                        1 Reply Last reply Reply Quote 2
                        • Victorel PetrovichV
                          Victorel Petrovich @deleelee
                          last edited by

                          @deleelee said in [Feature Request] Increase number of delimiters:

                          The only issue I see with this is that some people may want to define ‘unmatched’ delimiters (eg: ( to open and ] to close)

                          I believe that by “matching pair”, in his reply, @PeterJones meant whatever you define it to be, so it can be (] if you want so.
                          His general suggestion on space-separated lists covers that, so you can include that as an alternative in your github request.

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