Highlighting delimiters without spaces before pare

2019-05-06 21:51发布

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?

2条回答
唯我独甜
2楼-- · 2019-05-06 22:32

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

查看更多
别忘想泡老子
3楼-- · 2019-05-06 22:49

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

查看更多
登录 后发表回答