Highlighting delimiters without spaces before pare

2019-05-06 22:13发布

问题:

I have a problem with custom syntax highlighting in Notepad++.

I want to display text in parentheses in a different color. In View → User Define Dialogue I've defined a custom language and set up corresponding delimiters, "(" and ")".

However, the problem is that Notepad++ is highlighting the text between parentheses only when there is a space before the left parenthesis. So for example, in ^reg(ular)?$ (ular) is not highlighted, but in ^reg (ular)$ it is.

Is there a way to force Notepad++ to recognize delimiters without the space before parentheses?

回答1:

If you add open parenthesis, "(", to the list of activated operators in the User Define [sic] Language, then the content will be highlighted between the opening and closing parentheses (which you set as the delimiters).



回答2:

add ( and ) in Operators 1 es better, then if you select ) in the source, the ( is hightlighted