Creating a new coloring matching character
NP++ conveniently color-codes matching pair of characters like round, box or curly brackets.
I’d like the same feature for more characters: pair of double-quotes and angled brackets.
example for double quotes:
is that user configurable?
Alan Kilborn last edited by Alan Kilborn
See https://notepad-plus-plus.org/community/topic/18018/highlighting-matched-single-and-double-quotes for recent discussion of that very thing.
they seem to argue about whether it’s even possible to nest quotation marks due to the difficulty of identifying what character opens and close the pair.
Nevertheless, this problem shouldn’t apply angled brackets. Those should be just as hard to identify as round brackets.
But is it even user-configurable but is it in the code of NP++ itself?
Ah, sorry, I didn’t read your original posting well enough. It does not appear that angled brackets are easily configured to behave like brackets or braces.
This seems strange, as scintilla core and npp do support angled brackets but, at least, in npp it doesn’t seem to work as expected. Maybe a bug !?
OP is talking only about coloring.
What you cited (both references) is for the on-demand brace-matching feature (Search > Go to Matching Brace).
But I think you are right; from the N++ code it appears angled brackets are supported, but the go-to-matching feature is not enabled when near an angled bracket.
from the images I got the impression that OP is referring to colors used by matching braces functionality but I might be wrong.
from the images
I think the images are inconclusive on that point; I thought the OP was talking about just careting over an opening or closing brace/bracket and seeing the match be color-highlighted. Perhaps if the OP meant the on-demand feature he would have thought it important enough to mention? Or, I’m totally wrong. :)
Or, I’m totally wrong. :)
… or both of use :-D
BigMat Lecircuit last edited by BigMat Lecircuit
When I place the cursor right before or after an angle bracket (felt or right), I wanted NP++ to bold and color both angle brackets, assuming it finds the other side of the pair.
just like with curly brackets
I tried a few things but I guess this is a bug.
You might consider open an issue here.
and how shall I call this feature, so that the developer understand what I mean?
If this thread is of any indication, it seems I’m having trouble explaining what I wanted!
Thanks to all for help and feedback
It is called brace matching, I’m going to open an issue.
Ekopalypse last edited by Ekopalypse
there was a decision made long time ago that the angled bracket matching isn’t part of the builtin matching function
as too much languages do use angled brackets as operators, which then would falsely color those operators.
At the moment I do see two options for you.
- Open a feature request at github and define exactly how you want it to behave and for which languages (which itself shouldn’t use angled brackets as operators in their syntax) or
- Use one of the plugin scripting languages and make it as a feature for you.