Community
    • Login

    **Title: Proposal to Add `Ctrl + ]` Shortcut for Matching Braces**

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 105 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.
    • Todd MarshallT
      Todd Marshall
      last edited by

      Hi, I’m new here so I explored this issue with DuckDuckGo AI and asked it to summarize in the form of a submission here. Here is my submission with the help of the AI.

      Title: Proposal to Add Ctrl + ] Shortcut for Matching Braces

      Hello Notepad++ Community,

      I would like to propose adding a new keyboard shortcut Ctrl + ] to enhance the navigation between matching braces and parentheses in Notepad++. Currently, pressing Ctrl + B moves the cursor between matching braces, but the behavior differs slightly compared to other popular editors like Visual Studio.

      Current Behavior:

      • At an opening brace {, Ctrl + B moves to the corresponding closing brace } and highlights it.
      • At the closing brace }, Ctrl + B moves to before the opening brace {, without highlighting it.

      Proposed Behavior:

      • I suggest implementing Ctrl + ] so that:
        • When the cursor is at the opening brace {, it behaves as it does now with Ctrl + B.
        • When at the closing brace }, Ctrl + ] should move the cursor directly back to the opening brace { and highlight it.

      Benefits:

      1. Consistency: This aligns Notepad++ with the behavior present in Visual Studio and other editors, making it easier for users who switch between them.
      2. Enhanced Usability: Users would have a more fluid experience without needing additional keystrokes to reposition the cursor manually.
      3. Preservation of Current Functionality: This change would not disrupt existing users as Ctrl + B can continue to function as it currently does.

      I believe this enhancement would greatly improve the user experience in Notepad++. Thank you for considering this proposal!

      Best regards,
      Todd Marshall

      PeterJonesP 1 Reply Last reply Reply Quote -2
      • PeterJonesP
        PeterJones @Todd Marshall
        last edited by PeterJones

        @Todd-Marshall said in **Title: Proposal to Add `Ctrl + ]` Shortcut for Matching Braces**:

        I explored this issue with DuckDuckGo AI and asked it to summarize in the form of a submission here

        LLM/AI/ChatGPT-generated content is not allowed here, as described in the Read here before posting post that you obviously didn’t read.

        I let this post through without immediately banning you, because you were obviously desparately trying to keep it on-topic, which is more than most LLM-posters do. But no more AI posts, or you will be banned, no more warnings or grace periods. (There are users here who will see this post, and wish I’d just banned you straight out.)


        At the closing brace }, Ctrl + B moves to before the opening brace {, without highlighting it.

        That is not what I see. If I have the caret just before or just after the closing brace, both opening and closing braces are highlighted. And when I do Ctrl+B to go to the opening brace, the caret is just before the initial brace, and both braces are still highlighted.

        So I don’t think there needs to be a feature request.

        BraceHighlightWorks.gif


        You shouldn’t believe everything AI tells you.

        • If AI was telling you that the Ctrl+B brace jumping doesn’t work right, it was hallucinating.
        • If you were claiming in your AI prompt that brace-jumping doesn’t work right, you were mistaken. And the nonsense you plugged into the AI became the nonsense claim in this “feature request”
          • If you believe I am mistaken, you will need to provide plenty of evidence, because it works right for me in any situation I can come up with.

        I think you either mis-described the situation to the AI in your prompt, or you let the AI make up any problem that it could propose a solution to, even if that problem doesn’t really exist. Don’t use a tool that you don’t understand, and don’t expect to be able to input garbage in an LLM prompt or the underlying training and get anything but garbage out: an LLM trained on lies will spew lies, and an LLM given a prompt with bad information can repeat that bad information back out.

        Todd MarshallT 1 Reply Last reply Reply Quote 1
        • Todd MarshallT
          Todd Marshall @PeterJones
          last edited by

          @PeterJones I did successfully create a User Defined Language profile for my GLEE programming language (see WithGLEE.com).

          On closer inspection I found that the behavior for Ctrl-B “is” what I proposed for Ctrl-D “when there is no open/close mismatch”.

          What I found was is this: The behavior for Ctrl-B is as I described if there is a mismatch between opens and closes. If there is no mismatch the behavior is as I described for Ctrl-D.

          Since I found the cause, I haven’t gone back and explored the Visual Studio behavior. I’ll now have to do that.

          Re. AI hallucinating? I agree, it does. But it gets me to solutions faster than any documentation I have yet to depend on. Even if the documentation is right, it is usually mired in COIK and so poorly organized that you have to read it in its entirety several times to hope to grasp its content. At least AI has a good memory and quick access.

          I’ll give you an example: BlackMagic’s DaVinci documentation is over 4,000 pages. Try to find what a “bin” is or what a “clip” is and how to mark one. Just try…

          1 Reply Last reply Reply Quote 0
          • Todd MarshallT
            Todd Marshall
            last edited by

            I examined the AI proposed submittal very carefully and it exactly described my issue. I trusted it used a form and format acceptable to this forum. I have since discovered the reason for the Ctrl-B behavior. It was because my code had mismatched braces. If you have matching open and close braces, it’s behavior is different… it aligns with the Ctrl-D I experienced with Visual Studio. Now I know.

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

              @Todd-Marshall ,

              Some comments, based on your two most recent posts:

              • We had no way to know how exactly you used the AI – it could have been either of the following:
                1. you prompted it to “take a common problem found in Notepad++ and propose a solution”
                  • This version was why I suggested it might have been hallucination
                  • Since you didn’t say earlier, I had no way to know this wasn’t what had happened.
                2. you prompted it with "brace matching is not working for me in Notepad++, with details X, Y, Z. could you re-write this as a “proposal for improvement”
                  • This version was why I suggested that it was bad data fed into the prompt (ie, that you were wrong)
                  • This turned out to be closer to the truth, as you described. Both in regards to what you actually asked the AI to do, and with regard to the fact that you were wrong or incomplete in your description to the AI
                  • This was a lot of extra effort on your part. Instead of explaining to the AI what you wanted to say, and then have it re-write your text in its own words, you could have just explained it to us in your own words. And it would have been better, because it wouldn’t have introduced the AI-garbage uncertainty. And you wouldn’t have been violating the forums rules for posting. So it would have been better all around.
                  • Your posts don’t even match the AI text you posted. In your two most-recent posts, you claim you suggested Ctrl+D, but your AI text actually suggested Ctrl+] … that’s two different keystrokes. So by going through the AI intermediary, you didn’t even know what you posted.
              • Re: Documentation:
                • I have no idea what you mean by “mired in COIK”
                • As the primary maintainer of the Notepad++ documentation, if you have concrete examples of how the Online User Manual is “poorly organized”, feel free to create an issue in the user manual repo with concrete descriptions… but understand that the basic structure is pretty set-in-stone at this point.
                • But if you really meant, “I have been burned by other documentation before, so I don’t bother reading any documentation”, the onus is still on you to give each new application’s documentation a chance before rejecting it out-of-hand.
                • I really don’t care about how good or bad the documentation for a major corporation’s huge flagship product is, and you basing your decision on whether or not to read any documentation based on a bad experience with a huge, gigantic application like that is rather unfair of you to any other documentation
              • Re: the root cause being mismatched braces: you cannot really expect a feature that says “go to matching brace” to work as you described you wanted when the braces aren’t matching. And, in fact, the way that Notepad++ does work helps to indicate that the braces are mismatched, now that you know what that symptom means.

              To sum up: don’t post AI-generated content in a Community of human Users of Notepad++; it’s not allowed, and it didn’t work well for you when you did.

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