Possible Duplicate:
Why don’t most vim color schemes look as nice as the screenshot when I use them?
I'm trying to transfer my vim configuration to be using it only from the terminal. Currently i'm using gVim and everything works fine.
But in terminal.app, the color scheme is off.. I'm using the Solarized 256 theme for terminal.app and the solarized theme in vim.
This is what they look like:
I had to set g:solarized_termtrans = 1 to get ti background to even show the right color.
I had this problem myself once.
However the following statement fixed everything, here's how I control Terminal support in my .vimrc file: https://github.com/Greduan/dotfiles/blob/8b48b0d788c0fed6fc14720bbe3ae9def31af947/vim/vimrc.vim#L550-L556
if !has('gui_running')
" Compatibility for Terminal
let g:solarized_termtrans=1
" Make Solarized use 16 colors for Terminal support
let g:solarized_termcolors=16
endif
Which basically fixes it for Terminal if you're using Terminal. Try using :let g:solarized_termcolors = 16
.
Pseudo code:
termtrans
equal to one.EDIT 1:
If you are sure you're using a 256 color terminal then you can also just leave this alone and it'll work perfectly. Like so: https://github.com/Greduan/dotfiles/blob/6dac113d8281b0201399831bf62a2ea520d28154/vim/vimrc.vim#L551-L561
if !has('gui_running')
" Compatibility for Terminal
let g:solarized_termtrans=1
if (&t_Co >= 256 || $TERM == 'xterm-256color')
" Do nothing, it handles itself.
else
" Make Solarized use 16 colors for Terminal support
let g:solarized_termcolors=16
endif
endif
What this does is check if you have a Terminal. If it does set termtrans
, then check if your Terminal has 256 colors, if it does leave it alone, if it doesn't then set Solarized to use 16 colors. This works out much better.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With