Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running vim, and trying to get the vim solarized colors to work in terminal.

I have this in my vimrc file:

set syntax on
set t_Co=256
" let g:solarized_termcolors=16
set background=light
colorscheme solarized

It doesn't seem to work.

I outputted (using :echo) the value of t_Co and it is 256.

What is the issue? I'm confused.

share|improve this question

migrated from stackoverflow.com Jul 16 '11 at 22:32

This question came from our site for professional and enthusiast programmers.

    
why is the g:solarized_termcolors=16 line commented out? –  Uku Loskit Jul 16 '11 at 22:10
    
because uncommenting it did not have any impact, its still all messed up, background is white, numbers on the left have a greyish background, and wherever there is text is greyish background. –  user27449 Jul 16 '11 at 22:14

4 Answers 4

You need to do:

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

let g:solarized_termcolors=256 enable degraded color mode. This is needed only if you do not apply solarized colors to your terminal emulator.

share|improve this answer
    
should I remove t_Co=256? When I did what you put, my entire terminal was blinking every second or so.... –  user27449 Jul 17 '11 at 4:10
    
Forcing the number of colors may work, but usually not. Set TERM environment variable to something appropiate for your emulator. What kind of terminal are you using? –  Pablo Castellazzi Jul 17 '11 at 18:49
    
I am on mac osx leapard, using the standard terminal. –  user27449 Jul 17 '11 at 19:53
    
Solarized's author explain how to setup Terminal.app properly here –  Pablo Castellazzi Jul 17 '11 at 20:18

I had similar problems, adding this to my .vimrc fixed my problems

set term=xterm-256color
set background=light
colorscheme default

I'm not sure why setting the color scheme to default worked but I'm using solarized light as my terminal theme so maybe the colors are just similar to solarized, however they're good enough for me.

share|improve this answer
    
set term=xterm-256color was the way to go for me. –  deadalnix Sep 23 '12 at 1:58
    
This is not setting the colorscheme to solarized. –  IanVaughan Nov 18 '13 at 14:38

I had the same problem with the default terminal, which do not support 256 colors. I installed iTerm2 and that solved the problem.

Edit:

Also, you need to install Solarized for iTerm2.

share|improve this answer

Well,

  1. First, Download solarized.vim to your .vim/colors folder

  2. Next, Download togglebg.vim to your .vim/autoload folder

Try to launch vim again & see if it works. If not, come back with error message

share|improve this answer
    
Tried that, and no change. I do get this error but I think its unrelated (after I installed command-t) vim/bundle/vim-makegreen/plugin/makegreen.vim: line 73: E227: mapping already exists for \t –  user27449 Jul 16 '11 at 23:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.