Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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

share|improve this answer
    
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. –  doctororange Jul 4 '10 at 17:10
    
not all colorschemes support 256colors. –  akira Jul 5 '10 at 4:35
    
I see. I'm yet to use a text editor that makes working with syntax highlighting truly simple :p –  doctororange Jul 5 '10 at 13:10
1  
just stay with vim for the rest of your life. you set it up once .. done. –  akira Jul 9 '10 at 12:11

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

http://www.vim.org/scripts/script.php?script_id=2390

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.