I have OSX Yosemite with iTerm2. I connect via ssh to my virtual machine with Debian 8. When I run vim all colors are messed up.
iTerm2 has xterm-256colors on.
A number of things can affect your Vim colorscheme.
Make sure iTerm has the terminal type correct. As you indicated already, you use xterm-256color
.
Make sure your remote shell has a matching terminal type, which you can verify with echo $TERM
. If it is not set already, configure your shell with something like
# For sh, bash, zsh, ksh
export TERM=xterm-256color
# For csh, tcsh
setenv TERM xterm-256color
If the color scheme you are trying to use assumes that 256-color support is available, you may also need to add to your .vimrc
:
set t_Co=256
Lastly, color schemes can be affected by the background
setting in Vim, which you can set to either dark
or light
. To see what it's set to,
:set background?
And to set it one way or the other in your .vimrc
,
set background=dark
(or light
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With