altercation / vim-colors-solarized

precision colorscheme for the vim text editor
http://ethanschoonover.com/solarized
6.59k stars 1.76k forks source link

Solarized only works in GVim and not Vim - Windows #112

Open pmdaly opened 10 years ago

pmdaly commented 10 years ago

How do I get the colorscheme to work in vim on windows?

cbadke commented 9 years ago

I used ConEmu as my console emulator and configured its colors to the Solarized scheme (built into ConEmu Settings, Features -> Colors).

In my vimrc I have

set background=dark
if has('gui_running')
  let g:solarized_termcolors=256
else
  let g:solarized_termcolors=16
endif
colorscheme solarized

This basically matches the recommended configuration for console users in the readme and works for both vim & gvim.

zolem commented 9 years ago

I'm using conemu for vim in powershell and trying to get this to work using the default solarized color scheme for conemu. I am having an issue where the background is using the 8 value instead of the 0 value.

Assuming I get all that fixed somehow the colors are all off quite a bit in powershell. Any ideas?

zolem commented 9 years ago

So I figured out my problem to get the colors just right using conemu and if you prefer just powershell this can work as well but you have to mess with the registry or with the properties->colors in powershell.

Going through the actual code to see what number of the 0-15 they assign to each of the solarized colors and then assigning the correct rgb/hex value to that number in powershell.

Color Value Number Value
let s:base03 = "#002b36" let s:base03 = "8"
let s:base02 = "#073642" let s:base02 = "0"
let s:base01 = "#586e75" let s:base01 = "10"
let s:base00 = "#657b83" let s:base00 = "11"
let s:base0 = "#839496" let s:base0 = "12"
let s:base1 = "#93a1a1" let s:base1 = "14"
let s:base2 = "#eee8d5" let s:base2 = "7"
let s:base3 = "#fdf6e3" let s:base3 = "15"
let s:yellow = "#b58900" let s:yellow = "3"
let s:orange = "#cb4b16" let s:orange = "9"
let s:red = "#dc322f" let s:red = "1"
let s:magenta = "#d33682" let s:magenta = "5"
let s:violet = "#6c71c4" let s:violet = "13"
let s:blue = "#268bd2" let s:blue = "4"
let s:cyan = "#2aa198" let s:cyan = "6"
let s:green = "#859900", or let s:green = "#719e07" let s:green = "2"

If you need to see which number is assigned to which value to make sure you have everything set up properly in powershell you can add this function to your profile:

Function Out-Colors(){
    [enum]::GetValues([ConsoleColor]) | % {
        Write-Host -NoNewLine "$($_.value__) : $_`t"
        Write-Host "COLOR`t" -ForegroundColor $_ -NoNewLine
        Write-Host "`t" -BackgroundColor $_
    }
}