This is a weird bug

the problem is the syntax highlighting (say zenburn) on vim randomly appears and disappears as I page up and down (using ctrlu and ctrld).. for example compare these two renders of the same file:

enter image description here and this one

enter image description here

so to switch between those two screens, i simply have to page up and down.. and it just appears and disappears (note: i confirmed the same behavior on both iTerm2 and terminal).

Also notice that for files that are small (ie doesn't have enough room to page up and down) the syntax highlighting doesn't appear at all.

How do I fix this?

  • 2
    I'm not sure why this happens. Sometimes vim just fails highlighting. You can use :syntax sync fromstart to have it "redraw" your code. I have it set up like this <leader>sy :syntax sync fromstart<cr> – Michael Oct 14 '17 at 13:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.