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'm trying to get the desert color scheme to work in vim. So far I have my colors folder

~/.vim/colors/desert.vim

And in my .vimrc file I have the line

colorscheme desert

Syntax highlighting turns on, but without the correct colors. I'm accessing vim through iTerm on macosx. I've tried setting this up on both my local machine as well as a remote ubuntu box. On the local machine vim is at version 7.2.108 and on the remote machine vim is at version 7.1.138.

I'm just starting out with cli so let me know what I'm leaving out.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

If you're using vim through a terminal and not using a graphical version like gvim or macvim, there's a chance you are in 256-color mode. I don't think the regular desert scheme is compatible with that. There's another colorscheme desert256 you might try instead.

colorscheme desert256

You might also need to put something like:

set t_Co=256

in your .vimrc.

share|improve this answer
    
That in combination with Joni's suggestion worked on my local machine, but on the remote machine everything is now only a combination of two colors. A white and a sort of pinkish. Any idea where I went wrong? I've tired going back and removing colorscheme and t_Co in .vimrc as well as Term=xterm-256color in .bashrc –  clang1234 Oct 6 '10 at 22:05
    
Turns out the pinkish color was coming from my iTerm sesssion changing the color of bolded text. I've turned that off, now I have no colors besides black background and white text. –  clang1234 Oct 6 '10 at 22:20
1  
Try to add syntax on to your .vimrc –  Joni Oct 7 '10 at 18:30
    
Ya syntax on was already in there. The problem was the export Term command in bashrc was sticking around even after removing and sourcing the file. I found a suggestion to change the command to export TERM=xterm, leaving off the color part. That fixed it all up. –  clang1234 Oct 7 '10 at 21:21
    
Thanks @joni was missing syntax on. –  Arnis L. Nov 30 '12 at 8:54
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.