I have a user defined language for Notepad++. There is an issue with numbers. I have numbers set to highlight as 0xFF0000 (bright red). This works great for numbers like 5
, 844
, 108293
. The problem lies with hex numbers like 0x50
, 0x83
, etc. In the case of the hex numbers, the 0
shows correctly highlighted, then the x50
will show up as default color.
I know this can be set correctly to highlight the entire 0x50
as if I switch to C++, the numbers are highlighted properly.
Thanks for any help.
In Notepad++ 6.2.2 you can define style for hexadecimal numbers as shown below in the UDF dialog:
However, one caveat I've found which is true for a lot of the options in the UDF lexer is that except numbers at the end of a line, a space following the number is required for the lexer to determine it's a number.
So for example, the 0xFF and 0x00 will be treated as numbers, while 0x9F will not:
white = 0xFF
black = 0x00
SetColor(i, x, r.Min.Y, 0x9F)