Ubuntu – How to tell Vim to extend the background color to the whole screen

colorUbuntuvim

I have an issue with the Vim color schemes: The background color does not fill the whole screen. For example, in the "blue" color scheme the whole screen should turn blue. Instead, the blue background only extends to the end of each line. Is this a setting in the console I'm missing or is this an issue with my vim default settings?

I'm only having this issue with Ubuntu 10.10. echo $TERM outputs xterm-color.

[Update]: To eliminate error sources my minimal ~/.vimrc looks like this:

filetype plugin on
colorscheme blue
syntax on

/etc/vim/vimrc contains the unchanged defaults of Ubuntu

Best Answer

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 Vim extends the color scheme's background color to the whole terminal screen. This also works if Vim is being used inside tmux or GNU screen.