6

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?

3
  • vim appears to do the right thing for me, so hard to find suggestions. have you got any weird extensions or plugins? try disabling those to start with. Commented Sep 19, 2010 at 21:37
  • Did you try the recently released Vim 7.3? Commented Sep 19, 2010 at 22:55
  • I've got the same issue, and tracked it down to the line syntax on in mi .vimrc file. So it's not caused by any plugin. Commented Apr 8, 2013 at 14:17

1 Answer 1

8

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.