I am confused about how vim's color schemes seem to be working for me with my gnome terminal color settings.

I have installed the colorscheme sample pack: http://www.vi-improved.org/color_sampler_pack/

All of these appear differently for me, and they change as I change my Foreground and Background colors and Palette in my gnome-terminal profile.

Is there some way to allow vim's color scheming to override these terminal settings?

Setting vim to use 256 colors using :set t_Co=256 changes the appearance, but does not solve the problem.

2 Answers 2


set your TERM environment variable to xterm-256color, as it is described in http://vim.wikia.com/wiki/256_colors_in_vim.

  • This seems to have gotten me half way. Some of the colorschemes appear to be able to change the background color now, but others don't, and any change to my terminal color preferences still seem to override the vim color preferences. Commented Jul 4, 2010 at 17:10
  • not all colorschemes support 256colors.
    – akira
    Commented Jul 5, 2010 at 4:35
  • I see. I'm yet to use a text editor that makes working with syntax highlighting truly simple :p Commented Jul 5, 2010 at 13:10
  • 1
    just stay with vim for the rest of your life. you set it up once .. done.
    – akira
    Commented Jul 9, 2010 at 12:11

In addition to setting the TERM as above, you might like to install CSApprox:


The problem you're having (as am I) is that many colorschemes use guifg/guibg settings rather than ctermfg/ctermbg (used in colour terminals), and also use #-colors (numeric codes) rather then the colour terminal colour names.

Rather than expecting the colorscheme authors to spend their time recreating colour schemes for colour terminals (or doing the work yourself!) the CSApprox plugin automatically finds the closest match to the GUI colour, and sets it whenever you change colorscheme.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .