1
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:
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?
2I'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 – 2017-10-14T13:23:21.227http://vim.wikia.com/wiki/Fix_syntax_highlighting – oalders – 2018-07-12T15:07:24.700