I am using your plugin in a config file and I note that dash and underscore are not recognized as delimiters for hex colours (#rrggbb or #rgb)
Therefore, the following occurrences are not highlighted:
Hm, I suspect, Hex Codes shouldn't be word-bounded at all?
Hex colors can be word-bounded or delimited by [-_]
fixes issue #13
Really fix issue #13
Already in use - 15 minutes after commit. Best vim extension ever!
The behaviour for the following scenarios has changed. The following hex colours get highlighted now:
#FFFFFF00 (the 6 Fs are highlighted)
#FFF00 (the 3 Fs are highlighted)
It seems that you recognize # followed by 6 or 3 digits as a colour regadless of the right boundary character.
See also issue #7.
I think a 3- or 6-digit hex number should only get highlighted if preceded by a hash and followed by a non-hex digit.
However, one pleasing side-effect of the current behaviour is that the RGB in RGBA hex codes get highlighted. I know you can't represent a transparent colour but I still find it useful to see the fully opaque colour.
It would be nice of 8-digit hex codes (#rrggbbaa) could get highlighted with the colour indicated by the first six digits.
However, then you would have to support 4-digit RGBA colours, too.
Prevent highlighting more than needed #13