as rajeev1982 has pointed out, setting t_Co
might do the trick
in my case, I was using tmux
, which sets the environment variable TERM=screen
, and vim sets t_Co=8
to fix, I now specify tmux to set TERM=screen-256color
by adding the following line to ~/.tmux.conf
set -g default-terminal "screen-256color"
then, I let VIM set the variable t_Co
accordingly by adding the following to ~/.vimrc
if &term =~ "-256color$"