简体   繁体   中英

Vim color scheme not displaying properly

I downloaded the Dark.vim color scheme from here: http://vimcolorschemetest.googlecode.com/svn/html/index-c.html (Click on Dark.vim to see the code)

Then put it in ~/.vim/colors .

I also did the same for 256-jungle.vim and af.vim .

:colorscheme Dark , :colorscheme af , etc. all work (ie they change vim's syntax highlighting) but none of them look like the screenshots in the link above.

Instead, they look like this (ordered af.vim, 256-jungle.vim, Dark.vim): http://imgur.com/a/NsmHy

At first I thought this might be a problem with the color-settings in my terminal, so I followed tips from a "256 colors in vim" Vim wiki-doc page, which told me to add the following to my ~/.bash_profile :

TERM=xterm-256color

# for enabling 256 color, as per http://vim.wikia.com/wiki/256_colors_in_vim
if [ -e /usr/share/terminfo/x/xterm-256color ]; then
        export TERM='xterm-256color'
else
        export TERM='xterm-color'
fi

This didn't work.

Also, here's what's in my ~/.vimrc file:

set tabstop=2
set t_Co=256
colorscheme 256-jungle
colorscheme Dark
syntax on
let $VIM='~/.vim/'

Any thoughts on what's causing this disparity between what the colorschemes "should" look like and what's actually being displayed in my terminal? I'm running Mac OS X 10.8.2.

Thanks in advance for any help.

The Dark colorscheme you tried to use in terminal is actually a scheme for GUI (if you take a look at it's code, you'll see only 'guifg, guibg' etc. definitions). To run gui colorschemes in a terminal you can try CSApprox plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM