I'm guessing lots of people get this problem, but I can't seem to find any other threads/questions about it anywhere. I guess it's difficult to capture in keywords.
Basically, Vim doesn't draw the background color when scrolling up in places where there is no text. I've also seen it on my friend's Mac, so it's not peculiar to my setup.
I have a pretty big vimrc, but I get the same problem without a vimrc and setting :colorscheme
blue.
I'm using gnome-terminal on Ubuntu 11.10 (Oneiric Ocelot). It's a fairly clean install that I set up only a few days ago, so there's not really any funny business going on. I expect this would happen out of the box.
I've not had this problem in other contexts eg over SSH with PuTTY or previous versions of Ubuntu which I'm guessing was also gnome-terminal.
What's going on?
In Linux I had export TERM=xterm-256color
in my .bashrc
. That caused Vim to look like this (after setting set t_Co=256
):
When I removed that line from my .bashrc
and opened a new terminal ( exec bash
didn't do it). This is what I get (you need to have set t_Co=256
):
Try running :set t_Co=256
(replacing 256 with the value corresponding to the number of colors your terminal supports). A similar looking (though less conspicuous) problem of mine was caused by using too few of the available terminal colors in Vim. To figure out how many colors your terminal supports, see this .
I had to do two things:
Remove set t_Co=256
in my .vimrc
. (The terminal showed 256 colors anyway)
The color blocks still appeared when scrolling though, so I had to do the change detailed here: https://superuser.com/questions/457911/in-vim-background-color-changes-on-scrolling
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.