Last Updated: February 25, 2016
· konstantin

css color preview plugin done right

This is a post about plugin for color highlighting that I wrote.


Before writing my own I used two plugins for previewing colors. First one was skammer vim-css-color and second was a great fork from Aristotle Pagaltzis which fixed many issues from original plugin.

But there was still a bug that was very painful(at least for me). When you had cursorline on(:set cursorline) the color behind text disappeared and the foreground was left as it is.


This was fixed in another plugin which had other problems(it didn't work with hsl(a) and it couldn't highlight named colors).

So I decided to merge the two, take good parts from both and wrote many stuff myself.


As you can see there is no problem with cursorline and still you can have multiple colors on same line

Picture can type named colors in any way and they will still be highlighted


...and you can still use hsl(a).

Grab it here

or install via vundle:

Bundle ''

Don't forget to 'star' the repo!

2 Responses
Add your response

You could have simply used my improved colorhighlight plugin:

over 1 year ago ·

I added cursorline support to my vim-css-color fork a while back.

over 1 year ago ·