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

5 Answers 5

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
2  
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

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 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

I tried installing both ANSI and xterm-256color themes for OS X's Terminal and vim's color scheme with partial success.

The ANSI colors were never imported in Terminal.app — which I expected, so I considered 2 options.

  1. Manually set the values clicking on each swatch, then using Color Sliders set to color space sRGB (!) and then entering them in RGB or HSB sliders.

http://ethanschoonover.com/solarized#the-values

SOLARIZED HEX     16/8 TERMCOL  XTERM/HEX   L*A*B      RGB         HSB
--------- ------- ---- -------  ----------- ---------- ----------- -----------
base03    #002b36  8/4 brblack  234 #1c1c1c 15 -12 -12   0  43  54 193 100  21
base02    #073642  0/4 black    235 #262626 20 -12 -12   7  54  66 192  90  26
base01    #586e75 10/7 brgreen  240 #585858 45 -07 -07  88 110 117 194  25  46
base00    #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195  23  51
base0     #839496 12/6 brblue   244 #808080 60 -06 -03 131 148 150 186  13  59
base1     #93a1a1 14/4 brcyan   245 #8a8a8a 65 -05 -02 147 161 161 180   9  63
base2     #eee8d5  7/7 white    254 #e4e4e4 92 -00  10 238 232 213  44  11  93
base3     #fdf6e3 15/7 brwhite  230 #ffffd7 97  00  10 253 246 227  44  10  99
yellow    #b58900  3/3 yellow   136 #af8700 60  10  65 181 137   0  45 100  71
orange    #cb4b16  9/3 brred    166 #d75f00 50  50  55 203  75  22  18  89  80
red       #dc322f  1/1 red      160 #d70000 50  65  45 220  50  47   1  79  86
magenta   #d33682  5/5 magenta  125 #af005f 50  65 -05 211  54 130 331  74  83
violet    #6c71c4 13/5 brmagenta 61 #5f5faf 50  15 -45 108 113 196 237  45  77
blue      #268bd2  4/4 blue      33 #0087ff 55 -10 -45  38 139 210 205  82  82
cyan      #2aa198  6/6 cyan      37 #00afaf 60 -35 -05  42 161 152 175  74  63
green     #859900  2/2 green     64 #5f8700 60 -20  65 133 153   0  68 100  60
  1. Install the Solarized Palette and use Color Palettes to set each swatch (see above table for color name mapping).

You can find the minimally customized Solarized themes I exported from Terminal.app after doing 2., here.

Tested successfully on OS X 10.8.5, Terminal 2.3.

share|improve this answer

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.