How to tell Vim to extend the background color to the whole screen?
Solution 1
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.
Solution 2
I had the same issue with Ubuntu 12.04 and OpenBSD 5.1 when using vim inside of tmux. Ultimately, I was able to resolve it by setting my terminal type to screen-256color.
Related videos on Youtube
chiborg
Updated on September 18, 2022Comments
-
chiborg almost 2 years
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
outputsxterm-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-
Uku Loskit about 13 yearsare you using screen?
-
chiborg about 13 yearsNo, I'm not using screen
-
Martin about 13 yearshave you tried setting in vim
set t_Co=256
? -
gerryk about 13 yearscan you post the relevant section of .vimrc?
-
chiborg about 13 years
set t_Co=256
makes the foreground text blink, but does not change the background color.
-