solarized.vim: tty colors (fix #242)

This commit is contained in:
Stanislav Seletskiy 2013-09-10 23:49:37 +07:00
parent e1be8ff22f
commit d2c70194b0

View File

@ -7,29 +7,30 @@ function! s:generate()
let s:reduced = get(g:, 'airline_solarized_reduced', 1) let s:reduced = get(g:, 'airline_solarized_reduced', 1)
let s:background = get(g:, 'airline_solarized_bg', &background) let s:background = get(g:, 'airline_solarized_bg', &background)
let s:ansi_colors = get(g:, 'solarized_termcolors', 16) != 256 && &t_Co >= 16 ? 1 : 0 let s:ansi_colors = get(g:, 'solarized_termcolors', 16) != 256 && &t_Co >= 16 ? 1 : 0
let s:tty = &t_Co == 8
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" Colors " Colors
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" Base colors " Base colors
let s:base03 = {'t': s:ansi_colors ? 8 : 234, 'g': '#002b36'} let s:base03 = {'t': s:ansi_colors ? 8 : (s:tty ? '0' : 234), 'g': '#002b36'}
let s:base02 = {'t': s:ansi_colors ? '0' : 235, 'g': '#073642'} let s:base02 = {'t': s:ansi_colors ? '0' : (s:tty ? '0' : 235), 'g': '#073642'}
let s:base01 = {'t': s:ansi_colors ? 10 : 240, 'g': '#586e75'} let s:base01 = {'t': s:ansi_colors ? 10 : (s:tty ? '0' : 240), 'g': '#586e75'}
let s:base00 = {'t': s:ansi_colors ? 11 : 241, 'g': '#657b83'} let s:base00 = {'t': s:ansi_colors ? 11 : (s:tty ? '7' : 241), 'g': '#657b83'}
let s:base0 = {'t': s:ansi_colors ? 12 : 244, 'g': '#839496'} let s:base0 = {'t': s:ansi_colors ? 12 : (s:tty ? '7' : 244), 'g': '#839496'}
let s:base1 = {'t': s:ansi_colors ? 14 : 245, 'g': '#93a1a1'} let s:base1 = {'t': s:ansi_colors ? 14 : (s:tty ? '7' : 245), 'g': '#93a1a1'}
let s:base2 = {'t': s:ansi_colors ? 7 : 254, 'g': '#eee8d5'} let s:base2 = {'t': s:ansi_colors ? 7 : (s:tty ? '7' : 254), 'g': '#eee8d5'}
let s:base3 = {'t': s:ansi_colors ? 15 : 230, 'g': '#fdf6e3'} let s:base3 = {'t': s:ansi_colors ? 15 : (s:tty ? '7' : 230), 'g': '#fdf6e3'}
let s:yellow = {'t': s:ansi_colors ? 3 : 136, 'g': '#b58900'} let s:yellow = {'t': s:ansi_colors ? 3 : (s:tty ? '3' : 136), 'g': '#b58900'}
let s:orange = {'t': s:ansi_colors ? 9 : 166, 'g': '#cb4b16'} let s:orange = {'t': s:ansi_colors ? 9 : (s:tty ? '1' : 166), 'g': '#cb4b16'}
let s:red = {'t': s:ansi_colors ? 1 : 160, 'g': '#dc322f'} let s:red = {'t': s:ansi_colors ? 1 : (s:tty ? '1' : 160), 'g': '#dc322f'}
let s:magenta = {'t': s:ansi_colors ? 5 : 125, 'g': '#d33682'} let s:magenta = {'t': s:ansi_colors ? 5 : (s:tty ? '5' : 125), 'g': '#d33682'}
let s:violet = {'t': s:ansi_colors ? 13 : 61 , 'g': '#6c71c4'} let s:violet = {'t': s:ansi_colors ? 13 : (s:tty ? '5' : 61 ), 'g': '#6c71c4'}
let s:blue = {'t': s:ansi_colors ? 4 : 33 , 'g': '#268bd2'} let s:blue = {'t': s:ansi_colors ? 4 : (s:tty ? '4' : 33 ), 'g': '#268bd2'}
let s:cyan = {'t': s:ansi_colors ? 6 : 37 , 'g': '#2aa198'} let s:cyan = {'t': s:ansi_colors ? 6 : (s:tty ? '6' : 37 ), 'g': '#2aa198'}
let s:green = {'t': s:ansi_colors ? 2 : 64 , 'g': '#859900'} let s:green = {'t': s:ansi_colors ? 2 : (s:tty ? '2' : 64 ), 'g': '#859900'}
let s:color236= {'t': s:ansi_colors ? '0' : 236, 'g': '#303030'} let s:color236= {'t': s:ansi_colors ? '0' : (s:tty ? '0' : 236), 'g': '#303030'}
let s:color251= {'t': s:ansi_colors ? 14 : 251, 'g': '#c6c6c6'} let s:color251= {'t': s:ansi_colors ? 14 : (s:tty ? '7' : 251), 'g': '#c6c6c6'}
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" Simple mappings " Simple mappings