3

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.

1 Answer 1

6

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.

4
  • 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, 2010 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, 2010 at 22:20
  • 1
    Try to add syntax on to your .vimrc
    – Joni
    Oct 7, 2010 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, 2010 at 21:21

You must log in to answer this question.

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