find and display matching delimiter
-
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.
-
@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.
-
@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 -
@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?
-
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.
You could probably write a PythonScript that does something like that. I may try that later today.
-
@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.
-
@Mark-Olson neat. but i don’t use VStudio.
-
@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:
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…
-
@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.