vim-css-color
vim-css-color copied to clipboard
only catching first 3 letters of 6 letter hex colors
I'm finding that the plugin is only reading the first 3 colors in some cases.
http://uploads.mitechie.com/vim-css-color.png
I've had this happen too. Sorry for not providing steps to reproduce, can't figure out what they would be!
I’ve tried to track this down but I can’t find any sensible reason why it won’t work. By all rights it should! Yet it doesn’t. And equally, no change I’ve made to try to fix it has worked. At this point I have to wonder if it’s not actually a bug in Vim.
Ah, I found it. The reason was that the matches were being set up without \> and vim is satisfied to match just #bbb for a match group that includes both /#bbb/ and /#bbbbbb/. By making them /#bbb\>/ and /#bbbbbb\>/ vim is forced to pick the actual matching one.
So this is fixed now in my fork.
Awesome, good news AP. Thanks for the heads up. Hopefully it can get merged in.
You could just take my fork. It has diverged far from the code @skammer patched and is much faster. He would have to either adopt my code or re-do the change for the old code, but he hasn’t commented on any tickets or made any commits since his original patch. I don’t know if he’s interested in active maintenance, though maybe he just got busy.