How to define whitespace (tabs and spaces) in Notepad++ UDL

notepad

How do you specify a whitespace (tabs, spaces) in an UDL?
I want to apply lines begining with (tab + space + space) with a special style.

Thanks.

Best Answer

There's no way. Even if you insert tab character into clipboard and paste it into text box in UDL editor, it is not recognized as part of a keyword. It looks like tabs and spaces are hardcoded as whitespace characters and they cannot be detected as symbols utilizable by user in the UDL2.0.

UDL2.0 is deliberately kept at simpler level and therefore it has its limitations. Perhaps try with UDL's in other editors which allow more complex language definitions. Someone was recommending SynWrite. Its UDL engine is more complex, more powerful, and therefore also more difficult to learn :)

EDIT:

Here's my simple UDL definition in SynWrite. I only added blue "Style 1" and the following "Token rule 1". It does what you asked for, see bottom-right section of the window:

enter image description here

You can potentially omit \S from the rule regex to relax it a little.

Related Question