开发者

VIM syntax high-lighting chokes in CSS files using data:image

I have a CSS file with some pretty basic stuff including a data:image like so:

#next {
     background-image: url("data:image/png,%89PNG%0D%0");

The actual data string is much longer, but I've truncated for this post. The vim CSS syntax highlighter chokes on that long string and forces the rest of my css declarations in that file to not be highlighted. vim is also slow in this file when that declaration is visible (e.g. when it's trying to highlight for the data url开发者_开发问答). Anyone have any recommendations for fixing/circumventing this?


I was just struggling with this issue.

For me the fix was to modify my .vimrc to include:

set synmaxcol=200

I got this tip from this thread: https://superuser.com/questions/302186/vim-scrolls-very-slow-when-a-line-is-to-long

Hope it helps someone else too.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜