Last Updated: February 25, 2016
·
2.492K
· konstantin

css color preview plugin done right

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

pic

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.

Picture

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.

Picture

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

Picture

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

Picture

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

Grab it here

or install via vundle:

Bundle 'https://github.com/gorodinskiy/vim-coloresque.git'

Don't forget to 'star' the repo!

2 Responses
Add your response

You could have simply used my improved colorhighlight plugin: https://github.com/chrisbra/colorhighlight

over 1 year ago ·

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

over 1 year ago ·