Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 822
jpfuentes2 Avatar asked Sep 19 '10 20:09

jpfuentes2


1 Answers

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.

like image 163
knowuh Avatar answered Nov 15 '22 07:11

knowuh