开发者

Is the a scheme definition that highlights CSS properties and non-numerical values in Vim with different colors?

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

   #rights {
     float: le开发者_运维知识库ft;
     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)?


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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜