• Login
Community
  • Login

find and display matching delimiter

Scheduled Pinned Locked Moved General Discussion
9 Posts 5 Posters 703 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.
  • B
    Bob-Wright
    last edited by Mar 7, 2023, 6:41 PM

    One thing I have to give VSCode over notepad++ is the way it demarcates or shows the matching delimiter, say an opening or closing bracket or paren or curly brace etc. In notepad++ if I am at say a left curly brace and the right curly brace is well down below it in the listing, the notepad++ method of “highlighting” or marking that appearance is basically useless.

    Surely there must be a better way of displaying and marking both the opening and closing delimiter such that they can BOTH be easily found. I see this as a major failure of the UI.

    T 1 Reply Last reply Mar 7, 2023, 6:45 PM Reply Quote 0
    • T
      Terry R @Bob-Wright
      last edited by Terry R Mar 7, 2023, 6:47 PM Mar 7, 2023, 6:45 PM

      @Bob-Wright said in find and display matching delimiter:

      Surely there must be a better way of displaying and marking both the opening and closing delimiter such that they can BOTH be easily found. I see this as a major failure of the UI.

      Unless I’m missing the point, have you tried Ctrl B (default hot key)? This moves you to the “matching brace”. Just see the “Search” menu.

      Terry

      PS EDIT, should also add that Ctrl Alt B also selects ALL between the matching brace, see next menu item under the previous one.

      B 1 Reply Last reply Mar 7, 2023, 7:00 PM Reply Quote 1
      • B
        Bob-Wright @Terry R
        last edited by Mar 7, 2023, 7:00 PM

        @Terry-R no i have not. but i am “fixin to try it”. I have a curly brace and somewhere a few hundred lines down is its counterpart. I have to say that displaying the matching delimiter is one of VSCode’s strong points.

        But, Alright! That CTRL-B more or less does the trick. It even toggles the cursor location back and forth. So you have my sincere thank you and gratitude!

        On the up and up I do like Notepad++ and use it daily.
        BobW

        A 1 Reply Last reply Mar 7, 2023, 7:12 PM Reply Quote 1
        • A
          Alan Kilborn @Bob-Wright
          last edited by Mar 7, 2023, 7:12 PM

          @Bob-Wright said in find and display matching delimiter:

          It could make more sense to just ask about such a feature, or RTFM, instead of ranting about a “major failure of the UI”.

          I have to say that displaying the matching delimiter is one of VSCode’s strong points.

          How does N++ NOT call out the matching delimiter?
          When I move the caret next to a delimitable thing, it turns the delimiter next to the caret red, as well as also turning its match red.

          I have a curly brace and somewhere a few hundred lines down is its counterpart.

          Maybe I’m missing something, but if you are a “few hundred lines down”, how can you see both delimiters simultaneously anyway?

          B 1 Reply Last reply Mar 7, 2023, 7:53 PM Reply Quote 0
          • M
            Mark Olson
            last edited by Mark Olson Mar 7, 2023, 7:41 PM Mar 7, 2023, 7:25 PM

            Visual Studio (not VSCode) has a cool feature where if you hover over a bracket, a little text box pops up displaying the line with the matching bracket. That is even nicer than what NPP does by default.

            tooltip for matching bracket.PNG

            You could probably write a PythonScript that does something like that. I may try that later today.

            B 1 Reply Last reply Mar 7, 2023, 7:54 PM Reply Quote 1
            • B
              Bob-Wright @Alan Kilborn
              last edited by Mar 7, 2023, 7:53 PM

              @Alan-Kilborn How can I see both delimiters at one time in such a circumstance? By squinting of course. lols.

              That functionality you see, the turning the demarcated characters both red, my installation does not display that functionality. Perhaps it is a failure of the “theme” I am using. Regardless, the work around CTRL-B that @Terry-R suggested suits my needs.

              If the delimiters were clearly demarcated you would not need to see both at one time. I could simply scroll down and easily find the match. Meanwhile if I have to RTFM to use what should be an intuitive or obvious function then perhaps the app is a bit obfuscatory, certainly NOT intuitive.

              A 1 Reply Last reply Mar 7, 2023, 8:19 PM Reply Quote 0
              • B
                Bob-Wright @Mark Olson
                last edited by Mar 7, 2023, 7:54 PM

                @Mark-Olson neat. but i don’t use VStudio.

                P 1 Reply Last reply Mar 7, 2023, 10:03 PM Reply Quote 0
                • A
                  Alan Kilborn @Bob-Wright
                  last edited by Alan Kilborn Mar 7, 2023, 8:24 PM Mar 7, 2023, 8:19 PM

                  @Bob-Wright said in find and display matching delimiter:

                  turning the demarcated characters both red, my installation does not display that functionality. Perhaps it is a failure of the “theme” I am using.

                  Running a default N++ 8.5, I see the behavior in the default theme. I’m not about to go running through all the themes to see if they all work, just because you want to be cagey and don’t tell us what theme you’re using, so that someone could attempt to reproduce what you’re seeing. Ever heard of the proper way to report a suspected bug?

                  if I have to RTFM to use what should be an intuitive or obvious function then perhaps the app is a bit obfuscatory, certainly NOT intuitive.

                  My suggestion about RTFM was merely so you don’t post here and make a fool of yourself, like saying something is a major failure of the UI. Oops, way too late.

                  A lot of people RTFM find it good procedure to check a product’s manual before posting a question about functionality, in case they’ve just missed something.

                  By the way, the UI, besides turning it red to give you a big hint that it knows about delimiters and might have more functionality, doesn’t really hide that functionality:

                  11325fb2-4d71-4c98-804d-405dbf288767-image.png

                  Yes, yes, I know…if you have to look at the menus to get a whiff of capability, it isn’t intuitive enough. At least Terry has helped you enough so that you can move along now…

                  1 Reply Last reply Reply Quote 1
                  • P
                    PeterJones @Bob-Wright
                    last edited by Mar 7, 2023, 10:03 PM

                    @Bob-Wright ,.

                    I first assumed that when you said,

                    the notepad++ method of “highlighting” or marking that appearance is basically useless.

                    you were just trying to be rude.

                    But then you said,

                    That functionality you see, the turning the demarcated characters both red, my installation does not display that functionality. Perhaps it is a failure of the “theme” I am using.

                    So now it looks like you changed a setting, and that then obfuscated a built-in feature, so you genuinely didn’t know that the feature you wanted existed and works out-of-the-box. It’s hard not to assume the worst when a rude / argumentative tone is taken from the start.

                    Which theme do you use, that it doesn’t show the matching braces? If that’s the default behavior of one of the bundled themes, I will see if we can get the developers to fix that. Without specific details of which theme and which version of Notepad++ you are using (?-menu, Debug Info for full version info), I won’t be able to dig into whether there is something wrong with a particular theme that ships with Notepad++ or not.

                    the work around CTRL-B

                    That’s not a workaround. That’s the Notepad++ feature that takes you between braces. And if your settings prevent you from seeing the highlighting, that’s not the fault of the Notepad++ development team – they assume that users won’t change colors in such a way as to make a highlight invisible unless that’s what they want.

                    If the delimiters were clearly demarcated

                    They are. Out of the box, with no settings changes, they are a bright red. I don’t know how much more clearly they could demarcate it.

                    Meanwhile if I have to RTFM to use what should be an intuitive or obvious feature

                    Anytime you don’t understand or cannot find any feature of a piece of software, the reasonable expectation is that you would read the manual. For Notepad++, I and others have spent dozens (hundreds by now?) of hours improving the manual over the last few years. When you or anyone else comes and says that they cannot be bothered to read the manual, it’s rather a slap in the face.

                    what should be an intuitive or obvious function

                    it is. It’s a bold red highlight on both the { and the } in default Notepad++ settings. If that’s not intuitive and obvious, I don’t know what is.

                    b7577d39-1c18-42ac-b15f-11d152fff58f-image.png

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