tags:

views:

37

answers:

1

In this CSS example, Vim highlights float and left with the same color.

   #rights {
     float: left;
     margin: 30px 0 0;
    }

with the following definition:

hi Type   guifg=#eeeeee gui=none

(in this case both float and left will be light gray.

Is the a scheme definition that highlight CSS properties and non-numerical values in Vim with different colors (only numbers are highlighted with different colors)?

A: 

The problem is that left is also a CSS keyword, and the syntax highlighting in vim is not smart enough to distinguish when "left" is being used as a literal value vs. as the name of a property.

example:

#rights {
    float: left;
    left: 210px;
}

It's possible that some of the color ordering could be changed around in the syntax file to make value color take priority over keyword color, but I doubt it. I've never seen a vim scheme that does that. I would just try to ignore it :)

ithcy