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 prefer using vim directly inside my terminal emulator (gnome-terminal or konsole) rather than using gvim, because it integrates better in my workflow.

Unfortunately, it also seems to make nice color schemes unavailable.

Is there an easy way to make color schemes such as wombat work in a terminal emulator?

share|improve this question
4  
Can we please stop migrating [vim] questions to SU, as per meta.stackoverflow.com/questions/25925/vim-questions-so-or-su/…;? Thanks. –  Yi Jiang Apr 9 '11 at 12:12
add comment

migrated from stackoverflow.com Apr 10 '11 at 8:26

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 4 down vote accepted

Colorschemes can be written specifically for gvim, or specifically for an 88/256 color terminal. If your terminal does not support 88 or 256 colors -- or your colorscheme doesn't support terminals at all, many colorschemes are not going to work.

If you are willing to give it a try the CSApprox.vim script will attempt to make gui colorschemes available in your terminal by changing the colorscheme to use colors that are available in your terminal.

Another option is to use the CSExact.vim script which instead changes your terminal's color palette to match the colors defined in the colorscheme. This has the advantage of being more precise with the few drawbacks mentioned in the docs.

share|improve this answer
add comment

Some colorschemes might only work in a 256-color terminal. What is the value of your TERM environment variable? Try setting it to e.g. xterm-256color.

share|improve this answer
add comment

first lines of my .vimrc:

if $COLORTERM == 'gnome-terminal'
    set term=gnome-256color
    colorscheme wombat
    "colorscheme railscasts
    "colorscheme ir_black
else
    colorscheme default
endif

(GNOME Terminal 2.30.2, VIM 7.2.330)

share|improve this answer
add comment

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.