add solarized colorscheme

This commit is contained in:
itchyny
2013-08-22 13:17:27 +09:00
parent fafa5f400d
commit 55b47883a5
4 changed files with 98 additions and 9 deletions

View File

@@ -7,6 +7,25 @@ A light and configurable statusline for Vim
![lightline.vim - powerline - visual](https://raw.github.com/itchyny/lightline.vim/master/image/powerline/3.png) ![lightline.vim - powerline - visual](https://raw.github.com/itchyny/lightline.vim/master/image/powerline/3.png)
![lightline.vim - powerline - replace](https://raw.github.com/itchyny/lightline.vim/master/image/powerline/4.png) ![lightline.vim - powerline - replace](https://raw.github.com/itchyny/lightline.vim/master/image/powerline/4.png)
### solarized theme (dark)
![lightline.vim - solarized_dark - normal](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_dark/1.png)
![lightline.vim - solarized_dark - insert](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_dark/2.png)
![lightline.vim - solarized_dark - visual](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_dark/3.png)
![lightline.vim - solarized_dark - replace](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_dark/4.png)
With branch name, readonly mark and modified mark.
![lightline.vim - solarized_dark - fugitive](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_dark/5.png)
### solarized theme (light)
![lightline.vim - solarized_light - normal](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_light/1.png)
![lightline.vim - solarized_light - insert](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_light/2.png)
![lightline.vim - solarized_light - visual](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_light/3.png)
![lightline.vim - solarized_light - replace](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_light/4.png)
With branch name, readonly mark and modified mark.
![lightline.vim - solarized_light - fugitive](https://raw.github.com/itchyny/lightline.vim/master/image/solarized_light/5.png)
### landscape theme (with font integration) ### landscape theme (with font integration)
![lightline.vim - landscape - normal](https://raw.github.com/itchyny/lightline.vim/master/image/landscape/1.png) ![lightline.vim - landscape - normal](https://raw.github.com/itchyny/lightline.vim/master/image/landscape/1.png)

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 22-Aug-2013. " Last Change: 2013/08/22 12:30:46.
" ============================================================================= " =============================================================================
let s:save_cpo = &cpo let s:save_cpo = &cpo
@@ -82,18 +82,18 @@ function! lightline#init()
for m in ['normal', 'insert', 'replace', 'visual', 'inactive'] for m in ['normal', 'insert', 'replace', 'visual', 'inactive']
let g:lightline.palette[m] = get(g:lightline.palette, m, {}) let g:lightline.palette[m] = get(g:lightline.palette, m, {})
endfor endfor
try " try
let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
catch " catch
call lightline#error('Colorscheme ' . g:lightline.colorscheme . ' could not loaded.') " call lightline#error('Colorscheme ' . g:lightline.colorscheme . ' could not loaded.')
let g:lightline.colorscheme = 'default' " let g:lightline.colorscheme = 'default'
let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette " let g:lightline.palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette
finally " finally
for m in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command'] for m in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command']
call lightline#highlight(m) call lightline#highlight(m)
endfor endfor
let s:_ = 0 " let s:_ = 0
endtry " endtry
endfunction endfunction
function! lightline#mode() function! lightline#mode()

View File

@@ -37,6 +37,15 @@ let s:cuicolor = {
\ 'gray8' : 247, \ 'gray8' : 247,
\ 'gray9' : 250, \ 'gray9' : 250,
\ 'gray10' : 252, \ 'gray10' : 252,
\
\ 'yellow' : 136,
\ 'orange' : 166,
\ 'red' : 160,
\ 'magenta' : 125,
\ 'violet' : 61,
\ 'blue' : 33,
\ 'cyan' : 37,
\ 'green' : 64,
\ } \ }
let s:guicolor = { let s:guicolor = {
@@ -78,6 +87,15 @@ let s:guicolor = {
\ 'gray8' : '#9e9e9e', \ 'gray8' : '#9e9e9e',
\ 'gray9' : '#bcbcbc', \ 'gray9' : '#bcbcbc',
\ 'gray10' : '#d0d0d0', \ 'gray10' : '#d0d0d0',
\
\ 'yellow' : '#b58900',
\ 'orange' : '#cb4b16',
\ 'red' : '#dc322f',
\ 'magenta' : '#d33682',
\ 'violet' : '#6c71c4',
\ 'blue' : '#268bd2',
\ 'cyan' : '#2aa198',
\ 'green' : '#859900',
\ } \ }
function! lightline#colorscheme#fill(p) function! lightline#colorscheme#fill(p)

View File

@@ -0,0 +1,52 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/default.vim
" Version: 0.0
" Author: itchyny
" License: MIT License
" Last Change: 2013/08/22 13:13:10.
" =============================================================================
let s:base03 = [ '#002b36', 234 ]
let s:base02 = [ '#073642', 235 ]
let s:base01 = [ '#586e75', 240 ]
let s:base00 = [ '#657b83', 241 ]
let s:base0 = [ '#839496', 244 ]
let s:base1 = [ '#93a1a1', 245 ]
let s:base2 = [ '#eee8d5', 254 ]
let s:base3 = [ '#fdf6e3', 230 ]
let s:yellow = [ '#b58900', 136 ]
let s:orange = [ '#cb4b16', 166 ]
let s:red = [ '#dc322f', 160 ]
let s:magenta = [ '#d33682', 125 ]
let s:violet = [ '#6c71c4', 61 ]
let s:blue = [ '#268bd2', 33 ]
let s:cyan = [ '#2aa198', 37 ]
let s:green = [ '#859900', 64 ]
if &background ==# 'light'
let [s:base03, s:base3] = [s:base3, s:base03]
let [s:base02, s:base2] = [s:base2, s:base02]
let [s:base01, s:base1] = [s:base1, s:base01]
let [s:base00, s:base0] = [s:base0, s:base00]
endif
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
let s:p.normal.left = [ [ s:base3, s:blue ], [ s:base3, s:base01 ] ]
let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ], [ s:base0, s:base02 ] ]
let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base0, s:base02 ], [ s:base0, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ]
let s:p.insert.left = [ [ s:base3, s:green ], [ s:base3, s:base01 ] ]
let s:p.replace.left = [ [ s:base3, s:red ], [ s:base3, s:base01 ] ]
let s:p.visual.left = [ [ s:base3, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base02, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base03, s:base03 ] ]
function! s:flatten(p)
for k in values(a:p)
for l in values(k)
for m in range(len(l))
let l[m] = [l[m][0][0], l[m][1][0], l[m][0][1], l[m][1][1]]
endfor
endfor
endfor
return a:p
endfunction
let g:lightline#colorscheme#solarized#palette = s:flatten(s:p)