• Login
Community
  • Login

Double-click on the bracket to select the text enclosed in brackets

Scheduled Pinned Locked Moved General Discussion
6 Posts 5 Posters 3.1k 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.
  • A
    AlekseyVarfalomich
    last edited by Feb 9, 2022, 1:50 PM

    I would really like to double-click on the opening or closing bracket to select the text enclosed in brackets. Moreover, it is possible to implement this both for ordinary brackets () and for [], as well as for {}, as well as for <>. Similar functionality is implemented in the AUTOCAD LISP editor, but only for (). With this function, it will be easy to check the correspondence of opening and closing brackets in the code.

    A 1 Reply Last reply Feb 9, 2022, 2:02 PM Reply Quote 0
    • A
      Alan Kilborn @AlekseyVarfalomich
      last edited by Feb 9, 2022, 2:02 PM

      @alekseyvarfalomich

      See:

      39abdfc7-7769-47a2-b01d-885fbed1df16-image.png

      or:

      2c91243a-bab5-4187-91fb-5482f9e5eb3f-image.png

      Doesn’t work for <…> though.

      P 1 Reply Last reply Feb 9, 2022, 2:11 PM Reply Quote 3
      • P
        PeterJones @Alan Kilborn
        last edited by PeterJones Feb 9, 2022, 2:12 PM Feb 9, 2022, 2:11 PM

        @AlekseyVarfalomich

        Further to what @Alan-Kilborn said, if you have your cursor next to one of the [({})] characters (as was said, it doesn’t work for <>), then it will highlight that parenthesis/bracket pair (both the open and close) with the color defined in the Preferences > Style Configurator > Language: Global Styles > Style: Brace highlight style settings

        5e4aebfe-bf35-44e0-93af-f96909281f9c-image.png

        … but on re-reading, your question really is more about the selecting between the matching braces, so the second half of Alan’s answer is most likely what you want.

        A 1 Reply Last reply Feb 9, 2022, 8:09 PM Reply Quote 5
        • A
          AlekseyVarfalomich @PeterJones
          last edited by Feb 9, 2022, 8:09 PM

          @peterjones
          I found that with Ctrl+DblClck by () selects their contents. But it only works for () and does not work for {} and []…

          M 1 Reply Last reply Feb 9, 2022, 8:20 PM Reply Quote 2
          • M
            Michael Vincent @AlekseyVarfalomich
            last edited by Feb 9, 2022, 8:20 PM

            @alekseyvarfalomich said in Double-click on the bracket to select the text enclosed in brackets:

            @peterjones
            I found that with Ctrl+DblClck by () selects their contents. But it only works for () and does not work for {} and []…

            Yes, it’s configured here:

            176bc8c0-93d5-4177-934e-6d5296ec43c0-image.png

            Seems you can only pick 1 open and 1 close rather than a list of open / close options - like ( [ { and } ] ).

            Cheers.

            N 1 Reply Last reply Jan 12, 2024, 2:04 PM Reply Quote 5
            • N
              Nidhal Flowgun @Michael Vincent
              last edited by Nidhal Flowgun Jan 12, 2024, 3:24 PM Jan 12, 2024, 2:04 PM

              in autohotkey, create a script that sends Ctrl+Alt+b when you ctrl+click.
              This is just one of the scripts I use to help me code in Notepad++

              #If WinActive(“ahk_class Notepad++”)
              ;; Ctrl+LButton to select what’s between brackets/parentheses
              ~^LButton::
              keywait, LButton
              if (A_TimeSinceThisHotkey<150){
              send, {lButton}
              send, ^!b
              send, {Shift Up}{Alt up}{Ctrl up}
              send, {sc0E9}
              }
              return

              #If

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