Community
    • Login

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

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 5 Posters 2.8k 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.
    • AlekseyVarfalomichA
      AlekseyVarfalomich
      last edited by

      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.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @AlekseyVarfalomich
        last edited by

        @alekseyvarfalomich

        See:

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

        or:

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

        Doesn’t work for <…> though.

        PeterJonesP 1 Reply Last reply Reply Quote 3
        • PeterJonesP
          PeterJones @Alan Kilborn
          last edited by PeterJones

          @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.

          AlekseyVarfalomichA 1 Reply Last reply Reply Quote 5
          • AlekseyVarfalomichA
            AlekseyVarfalomich @PeterJones
            last edited by

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

            Michael VincentM 1 Reply Last reply Reply Quote 2
            • Michael VincentM
              Michael Vincent @AlekseyVarfalomich
              last edited by

              @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.

              Nidhal FlowgunN 1 Reply Last reply Reply Quote 5
              • Nidhal FlowgunN
                Nidhal Flowgun @Michael Vincent
                last edited by Nidhal Flowgun

                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