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:
- If the user isn't using a GUI:
- Then set the
termtrans
equal to one.
- And tell Vim to only use 16 colors, or 256 if your Terminal supports it (don't know one that does).
- Endif
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.
$TERM
environment? to see its current state,echo $TERM
. If it isn't something likexterm-256color
you will need to set it as such. (in the Terminal.app prefs, I suppose) – Fulfil