Search code examples
vimterminalsyntax-highlightingcolor-schemevim-syntax-highlighting

Strange changing background color in VIM solarized


I don't know exactly how to describe this issue, but when using solarized colorscheme theme in terminal vim, I'm noticing that when I edit some text various ends of lines (not "line-endings" but from the last letter to the end of the buffer) will be somewhat highlighted. Once I move for example using <C-e>, or <C-y>, the weird highlighting fixes itself and becomes the background color.

Ideally I'd like to fix this and just have my background always be the background-color. But any insight as to what's going on/ being highlighted would be highly appreciated.

Thanks,

after having just edited text with weird highlighting after pressing <C-e> enter image description here


Solution

  • As explained here, disable Background Color Erase (BCE) by clearing the t_ut terminal option (run :set t_ut= in Vim and then press Control+L to refresh the terminal's display) so that color schemes work properly when Vim is used inside tmux and GNU screen.