开发者

Too light background for solaris scheme in Vim using zsh

I want to use solarized, which gives a decent color scheme in Vim. It works by setting the 16 colors ansi colors in the gnome-terminal. It works fine if I use Vim from bash, but in zsh the colors are off. Some letters have the right background, but most have too light background. What is it about zsh that interferes with the ans开发者_JAVA百科i colors as displayed by Vim?


I can't reproduce this - if this is still an issue, perhaps giving relevant sections of ~/.bashrc, ~/.zshrc, ~/.vimrc etc might help.

I'm using the Solarized vim colorscheme, and the linked Gnome-Terminal settings in the following screenshots. As you can see, they appear to be identical - there's certainly no color issues in either zsh or vim that I've noticed (I don't use bash much).

My zsh settings are taken from oh-my-zsh, and my prompt is a hacked-up version of Phil!'s ZSH prompt (I have messed with the coloring of Phil!'s ZSH prompt, because it didn't play well with the Solarized iTerm2 colors). However, I do not think I've messed with anything that would affect the Solarized colorings between bash and zsh in vim. Certainly the vim settings are identical between the two screenshots below.

Too light background for solaris scheme in Vim using zsh

Too light background for solaris scheme in Vim using zsh


I had the same problem on Ubuntu 14 with zsh.

This fixed it (in the .vimrc)

let g:solarized_termcolors=256
set background=light
colorscheme solarized


I know this is a veeery old question but I had the same problem and came across this so I thought it could still be useful to someone if I answered it.

For me TERM was not set to xterm-256color in zsh like it was in bash so the colours were messed up in vim. Simply adding export TERM=xterm-256color to the .zshrc file fixed the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜