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.

why is it that the colors when using the color scheme 'blackboard' via Vim in gnome terminal is not the same as when I use the same theme in gVim? i.e. the background is black while on gVim it's blue and the function names are not colroed etc. Only a few parts of teh code are colored.

Here's my .vimrc

filetype plugin indent on
set number
let &t_Co=256

Also on my Profile Preferences > Colors tab, I got: Bulit-in Schemes: Green on Black Built-in schemes: XTerm

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Take a look at CSApprox - very good at matching colourschemes (in linux at least - in OSX the default terminal does not have enough colours)

Fairly simple to set up - just configure how many colours are usable by your terminal and put the needed information in your .vimrc

share|improve this answer
    
Your solution works Simon! Thanks :) –  user22727 Jan 4 '10 at 15:35

Vim running in a terminal emulator uses so-called ANSI codes to display color. gVim doesn't relay on terminal emulation, and can use any RGB color it likes.

In the color scheme declaration that's guifg & guibg entries for gVim, and ctermfg & ctermbg entries for terminal emulators. See

:help syntax

for more details about differences between syntax highlighting between vim working inside a terminal emulator and as a standalone GUI program.

share|improve this answer
    
So is there a solution for it? –  user22727 Jan 3 '10 at 16:35
    
Sure. Edit either the mapping from ANSI colors to RGB in your terminal emulator to match the colors that gVim uses, or edit the definition of the color scheme for gVim to match RGB values that your terminal emulator uses. –  Tadeusz A. Kadłubowski Jan 3 '10 at 17:33

Take a look at this vim tips wiki page were two solutions for making consistent colorschemes between terminals and GUI are discussed.

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.