Community
    • Login

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

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 2 Posters 68 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 -1
      • 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 0
        • 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.

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