careful separators and colors improvement

This commit is contained in:
itchyny
2013-08-27 01:06:17 +09:00
parent 9f88adc9c1
commit 7a75ac570e
9 changed files with 146 additions and 101 deletions

View File

@@ -4,6 +4,7 @@ A light and configurable statusline for Vim
https://github.com/itchyny/lightline.vim https://github.com/itchyny/lightline.vim
### powerline theme (default) ### powerline theme (default)
![lightline.vim - powerline - normal](https://raw.github.com/wiki/itchyny/lightline.vim/image/powerline/1.png) ![lightline.vim - powerline - normal](https://raw.github.com/wiki/itchyny/lightline.vim/image/powerline/1.png)
![lightline.vim - powerline - insert](https://raw.github.com/wiki/itchyny/lightline.vim/image/powerline/2.png) ![lightline.vim - powerline - insert](https://raw.github.com/wiki/itchyny/lightline.vim/image/powerline/2.png)
![lightline.vim - powerline - visual](https://raw.github.com/wiki/itchyny/lightline.vim/image/powerline/3.png) ![lightline.vim - powerline - visual](https://raw.github.com/wiki/itchyny/lightline.vim/image/powerline/3.png)
@@ -44,6 +45,7 @@ https://github.com/itchyny/lightline.vim
![lightline.vim - landscape - insert](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/2.png) ![lightline.vim - landscape - insert](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/2.png)
![lightline.vim - landscape - visual](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/3.png) ![lightline.vim - landscape - visual](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/3.png)
![lightline.vim - landscape - replace](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/4.png) ![lightline.vim - landscape - replace](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/4.png)
With branch name, read-only mark and modified mark. With branch name, read-only mark and modified mark.
![lightline.vim - landscape - fugitive](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/5.png) ![lightline.vim - landscape - fugitive](https://raw.github.com/wiki/itchyny/lightline.vim/image/landscape/5.png)
@@ -91,6 +93,7 @@ MIT License
## Configuration tutorial ## Configuration tutorial
In default, the statusline looks like: In default, the statusline looks like:
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/1.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/1.png)
If you use the wombat colorscheme, add the following settings to your `.vimrc` (or \_vimrc on Windows): If you use the wombat colorscheme, add the following settings to your `.vimrc` (or \_vimrc on Windows):
```vim ```vim
let g:lightline = { let g:lightline = {
@@ -100,8 +103,39 @@ let g:lightline = {
to get: to get:
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/2.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/2.png)
If your statusline looks like
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/21.png)
and the cool statuslines appear only on `:vsp`, add
```vim
set laststatus=2
```
to your `.vimrc`.
If you have problem like
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/20.png)
then add
```sh
export TERM=xterm-256color
```
to your `.*shrc` and add
```vim
if !has('gui_running')
set t_Co=256
endif
```
to your `.vimrc`.
Colors appear correctly? Now let's see how to change the appearance.
You may think that the default read-only mark is not so cool: You may think that the default read-only mark is not so cool:
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/3.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/3.png)
Then edit the read-only component. Then edit the read-only component.
The lightline components are stored in `g:lightline.component`. The lightline components are stored in `g:lightline.component`.
So you add the settings of `g:lightline.component.readonly` in your `.vimrc`. (the following settings are effective with the patched font for vim-powerline): So you add the settings of `g:lightline.component.readonly` in your `.vimrc`. (the following settings are effective with the patched font for vim-powerline):
@@ -114,6 +148,7 @@ let g:lightline = {
\ } \ }
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/4.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/4.png)
How nice! How nice!
But the boundaries are quadrilateral. You may miss the powerline. But the boundaries are quadrilateral. You may miss the powerline.
@@ -129,12 +164,13 @@ let g:lightline = {
\ } \ }
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/5.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/5.png)
Hurrah! Cool!
Hurrah! Cool!
If your statusline looks like: If your statusline looks like:
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/16.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/16.png)
the patched font is not installed. the patched font is not installed.
There are two kinds of patched fonts: There are two kinds of patched fonts:
@@ -163,6 +199,7 @@ let g:lightline = {
If you have installed the font for powerline and your statusline looks like If you have installed the font for powerline and your statusline looks like
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/18.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/18.png)
remove remove
```vim ```vim
set ambiwidth=double set ambiwidth=double
@@ -183,27 +220,7 @@ let g:lightline = {
\ } \ }
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/17.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/17.png)
Still, if you have problem like
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/20.png)
then add
```sh
export TERM=xterm-256color
```
to your `.*shrc` and add
```vim
if !has('gui_running')
set t_Co=256
endif
```
to your `.vimrc`.
If your statusline looks like
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/21.png)
and the cool statusline appears only on splitting window, add
```vim
set laststatus=2
```
to your `.vimrc`.
Almost all of things go well with the patched font but if the triangle looks weird: Almost all of things go well with the patched font but if the triangle looks weird:
@@ -220,6 +237,7 @@ For other terminals, this weird-triangle problem will be resolved by disabling t
Now, let us get back to the tutorial (with the patched font for vim-powerline). Now, let us get back to the tutorial (with the patched font for vim-powerline).
You look into a help file to find the marks annoying. You look into a help file to find the marks annoying.
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/6.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/6.png)
Help files are read-only and no-modifiable? We know that! Help files are read-only and no-modifiable? We know that!
OK, so you again edit the components. OK, so you again edit the components.
```vim ```vim
@@ -234,6 +252,7 @@ let g:lightline = {
\ } \ }
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/7.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/7.png)
Huh? Weird! Huh? Weird!
The components do not collapse even if they have no information! The components do not collapse even if they have no information!
In order to avoid this situation, you set expressions to `g:lightline.component_visible_condition`, which should become 1 only when the corresponding components have information. In order to avoid this situation, you set expressions to `g:lightline.component_visible_condition`, which should become 1 only when the corresponding components have information.
@@ -253,6 +272,7 @@ let g:lightline = {
\ } \ }
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/8.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/8.png)
Okay. It works nice. Okay. It works nice.
@@ -282,9 +302,11 @@ let g:lightline = {
``` ```
If the plugin arranges all the components (in a situation you `set paste` and the file `.vimrc` is read-only, try to modify): If the plugin arranges all the components (in a situation you `set paste` and the file `.vimrc` is read-only, try to modify):
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/9.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/9.png)
The mode component, the paste component, read-only component, filename component and modified component in a row. The mode component, the paste component, read-only component, filename component and modified component in a row.
Normally, the paste component does not show up. Normally, the paste component does not show up.
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/10.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/10.png)
If the file is not read-only (more common cases), the read-only component does not show up. If the file is not read-only (more common cases), the read-only component does not show up.
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/11.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/11.png)
@@ -298,6 +320,7 @@ let g:lightline = {
``` ```
And the screen shot of all the components. And the screen shot of all the components.
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/9.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/9.png)
The mode and paste component are displayed in the same group. The mode and paste component are displayed in the same group.
The read-only, filename and modified component are in the second group. The read-only, filename and modified component are in the second group.
It corresponds to the structure of `g:lightline.active.left`. It corresponds to the structure of `g:lightline.active.left`.
@@ -343,6 +366,7 @@ let g:lightline = {
\ } \ }
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/12.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/12.png)
Okay, the branch component is added! Okay, the branch component is added!
@@ -396,6 +420,7 @@ function! MyFugitive()
endfunction endfunction
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/13.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/13.png)
Fine and readable! Fine and readable!
@@ -451,6 +476,7 @@ function! MyFilename()
endfunction endfunction
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/14.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/14.png)
Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline) Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline)
```vim ```vim
function! MyFugitive() function! MyFugitive()
@@ -458,6 +484,7 @@ function! MyFugitive()
endfunction endfunction
``` ```
![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/15.png) ![lightline.vim - tutorial](https://raw.github.com/wiki/itchyny/lightline.vim/image/tutorial/15.png)
How cool!!! How cool!!!
Of course, you can name your component as you wish. Of course, you can name your component as you wish.

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/26 16:51:35. " Last Change: 2013/08/27 01:01:16.
" ============================================================================= " =============================================================================
let s:save_cpo = &cpo let s:save_cpo = &cpo
@@ -121,8 +121,9 @@ function! s:gui2cui(rgb, fallback)
endfunction endfunction
function! lightline#highlight() function! lightline#highlight()
for mode in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command', 'select']
let [c, f] = [g:lightline.palette, g:lightline.mode_fallback] let [c, f] = [g:lightline.palette, g:lightline.mode_fallback]
let [g:lightline.llen, g:lightline.rlen] = [len(c.normal.left), len(c.normal.right)]
for mode in ['normal', 'insert', 'replace', 'visual', 'inactive', 'command', 'select']
let d = has_key(c, mode) ? mode : has_key(f, mode) && has_key(c, f[mode]) ? f[mode] : 'normal' let d = has_key(c, mode) ? mode : has_key(f, mode) && has_key(c, f[mode]) ? f[mode] : 'normal'
let left = d == 'inactive' ? g:lightline.inactive.left : g:lightline.active.left let left = d == 'inactive' ? g:lightline.inactive.left : g:lightline.active.left
let right = d == 'inactive' ? g:lightline.inactive.right : g:lightline.active.right let right = d == 'inactive' ? g:lightline.inactive.right : g:lightline.active.right
@@ -130,7 +131,6 @@ function! lightline#highlight()
let r = has_key(c,d) && has_key(c[d],'right') ? c[d].right : has_key(f,d) && has_key(c,f[d]) && has_key(c[f[d]],'right') ? c[f[d]].right : c.normal.right let r = has_key(c,d) && has_key(c[d],'right') ? c[d].right : has_key(f,d) && has_key(c,f[d]) && has_key(c[f[d]],'right') ? c[f[d]].right : c.normal.right
let m = has_key(c,d) && has_key(c[d],'middle') ? c[d].middle[0] : has_key(f,d) && has_key(c,f[d]) && has_key(c[f[d]],'middle') ? c[f[d]].middle[0] : c.normal.middle[0] let m = has_key(c,d) && has_key(c[d],'middle') ? c[d].middle[0] : has_key(f,d) && has_key(c,f[d]) && has_key(c[f[d]],'middle') ? c[f[d]].middle[0] : c.normal.middle[0]
if s:is_win32term if s:is_win32term
" patching color values for windows console
for _ in l for _ in l
let [_[2], _[3]] = [s:gui2cui(_[0], _[2]), s:gui2cui(_[1], _[3])] let [_[2], _[3]] = [s:gui2cui(_[0], _[2]), s:gui2cui(_[1], _[3])]
endfor endfor
@@ -140,16 +140,16 @@ function! lightline#highlight()
let [m[2], m[3]] = [s:gui2cui(m[0], m[2]), s:gui2cui(_[1], m[3])] let [m[2], m[3]] = [s:gui2cui(m[0], m[2]), s:gui2cui(_[1], m[3])]
endif endif
for i in range(len(left)) for i in range(len(left))
let [li, lj] = [i < len(l) ? l[i] : l[-1], i + 1 < len(l) ? l[i + 1] : l[-1]] let [li, lj] = [i < len(l) ? l[i] : m, i + 1 < len(l) ? l[i + 1] : m]
exec printf('hi LightLineLeft_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, li[0], li[1], li[2], li[3], s:term(li)) exec printf('hi LightLineLeft_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, li[0], li[1], li[2], li[3], s:term(li))
exec printf('hi LightLineLeft_%s_%d_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d', mode, exec printf('hi LightLineLeft_%s_%d_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d', mode,
\ i, i + 1, li[1], i == len(left) - 1 ? m[1] : lj[1], li[3], i == len(left) - 1 ? m[3] : lj[3]) \ i, i+1, i>=len(l) ? m[i+1==len(left)] : li[1], i==len(left)-1 ? m[1] : lj[1], i>=len(l) ? m[2+(i+1==len(left))] : li[3], i==len(left)-1 ? m[3] : lj[3])
endfor endfor
exec printf('hi LightLineMiddle_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, m[0], m[1], m[2], m[3], s:term(m)) exec printf('hi LightLineMiddle_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, m[0], m[1], m[2], m[3], s:term(m))
for i in range(len(right)) for i in range(len(right))
let [ri, rj] = [i < len(r) ? r[i] : r[-1], i + 1 < len(r) ? r[i + 1] : r[-1]] let [ri, rj] = [i < len(r) ? r[i] : m, i + 1 < len(r) ? r[i + 1] : m]
exec printf('hi LightLineRight_%s_%d_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d', mode, exec printf('hi LightLineRight_%s_%d_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d', mode,
\ i, i + 1, ri[1], i == len(right) - 1 ? m[1] : rj[1], ri[3], i == len(right) - 1 ? m[3] : rj[3]) \ i, i+1, i>=len(r) ? m[i+1==len(right)] : ri[1], i==len(right)-1 ? m[1] : rj[1], i>=len(r) ? m[2+(i+1==len(right))] : ri[3], i==len(right)-1 ? m[3] : rj[3])
exec printf('hi LightLineRight_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, ri[0], ri[1], ri[2], ri[3], s:term(ri)) exec printf('hi LightLineRight_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, ri[0], ri[1], ri[2], ri[3], s:term(ri))
endfor endfor
endfor endfor
@@ -170,7 +170,7 @@ function! lightline#subseparator(x, y, s)
endfunction endfunction
function! lightline#statusline(inactive) function! lightline#statusline(inactive)
let [_, c, f] = [ '%{lightline#link()}', g:lightline.component, g:lightline.component_function ] let [_, c, f, l, r] = [ '%{lightline#link()}', g:lightline.component, g:lightline.component_function, g:lightline.llen, g:lightline.rlen ]
let mode = a:inactive ? 'inactive' : 'active' let mode = a:inactive ? 'inactive' : 'active'
let left = has_key(g:lightline, mode) ? g:lightline[mode].left : g:lightline.active.left let left = has_key(g:lightline, mode) ? g:lightline[mode].left : g:lightline.active.left
let right = has_key(g:lightline, mode) ? g:lightline[mode].right : g:lightline.active.right let right = has_key(g:lightline, mode) ? g:lightline[mode].right : g:lightline.active.right
@@ -182,11 +182,11 @@ function! lightline#statusline(inactive)
let _ .= lightline#subseparator(left[i][j], left[i][j+1:], g:lightline.subseparator.left) let _ .= lightline#subseparator(left[i][j], left[i][j+1:], g:lightline.subseparator.left)
endif endif
endfor endfor
let _ .= printf('%%#LightLineLeft_%s_%d_%d#', mode, i, i + 1) . g:lightline.separator.left let _ .= printf('%%#LightLineLeft_%s_%d_%d#', mode, i, i + 1) . (i < l ? g:lightline.separator.left : g:lightline.subseparator.left)
endfor endfor
let _ .= printf('%%#LightLineMiddle_%s#%%=', mode) let _ .= printf('%%#LightLineMiddle_%s#%%=', mode)
for i in reverse(range(len(right))) for i in reverse(range(len(right)))
let _ .= printf('%%#LightLineRight_%s_%d_%d#', mode, i, i + 1) . g:lightline.separator.right let _ .= printf('%%#LightLineRight_%s_%d_%d#', mode, i, i + 1) . (i < r ? g:lightline.separator.right : g:lightline.subseparator.right)
let _ .= printf('%%#LightLineRight_%s_%d#', mode, i) let _ .= printf('%%#LightLineRight_%s_%d#', mode, i)
for j in range(len(right[i])) for j in range(len(right[i]))
if j if j

View File

@@ -3,53 +3,34 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/22 19:47:24. " Last Change: 2013/08/27 00:49:07.
" ============================================================================= " =============================================================================
if &background ==# 'light' let s:base03 = '#fafafa'
let s:base03 = '#fafafa' let s:base023 = '#dfdfdf'
let s:base023 = '#dfdfdf' let s:base02 = '#c8c8c8'
let s:base02 = '#c8c8c8' let s:base01 = '#b4b4b4'
let s:base01 = '#b4b4b4' let s:base00 = '#808080'
let s:base00 = '#808080' let s:base0 = '#666666'
let s:base0 = '#666666' let s:base1 = '#555555'
let s:base1 = '#555555' let s:base2 = '#4f4f4f'
let s:base2 = '#4f4f4f' let s:base3 = '#4d4d4c'
let s:base3 = '#4d4d4c' let s:red = '#c82829'
let s:red = '#c82829' let s:orange = '#f5871f'
let s:orange = '#f5871f' let s:yellow = '#eab700'
let s:yellow = '#eab700' let s:green = '#718c00'
let s:green = '#718c00' let s:cyan = '#3e999f'
let s:cyan = '#3e999f' let s:blue = '#4271ae'
let s:blue = '#4271ae' let s:magenta = '#8959a8'
let s:magenta = '#8959a8'
else
let s:base3 = '#c5c8c6'
let s:base2 = '#bababa'
let s:base1 = '#a0a0a0'
let s:base0 = '#909090'
let s:base00 = '#666666'
let s:base01 = '#555555'
let s:base02 = '#434343'
let s:base023 = '#303030'
let s:base03 = '#1d1f21'
let s:red = '#cc6666'
let s:orange = '#de935f'
let s:yellow = '#f0c674'
let s:green = '#b5bd68'
let s:cyan = '#8abeb7'
let s:blue = '#81a2be'
let s:magenta = '#b294bb'
endif
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}} let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] let s:p.normal.left = [ [ s:base02, 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.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ]
let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base0, s:base02 ], [ s:base0, s:base02 ] ] let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base00, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ] let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ]
let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ]
let s:p.replace.left = [ [ s:base02, s:orange ], [ s:base3, s:base01 ] ] let s:p.replace.left = [ [ s:base02, s:orange ], [ s:base3, s:base01 ] ]
let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base02, s:base02 ] ] let s:p.normal.middle = [ [ s:base0, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base023, s:base023 ] ] let s:p.inactive.middle = [ [ s:base0, s:base02 ] ]
let g:lightline#colorscheme#Tomorrow#palette = lightline#colorscheme#fill(s:p) let g:lightline#colorscheme#Tomorrow#palette = lightline#colorscheme#fill(s:p)

View File

@@ -0,0 +1,36 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/Tomorrow_Night.vim
" Version: 0.0
" Author: itchyny
" License: MIT License
" Last Change: 2013/08/27 00:48:59.
" =============================================================================
let s:base3 = '#c5c8c6'
let s:base2 = '#bababa'
let s:base1 = '#a0a0a0'
let s:base0 = '#909090'
let s:base00 = '#666666'
let s:base01 = '#555555'
let s:base02 = '#434343'
let s:base023 = '#303030'
let s:base03 = '#1d1f21'
let s:red = '#cc6666'
let s:orange = '#de935f'
let s:yellow = '#f0c674'
let s:green = '#b5bd68'
let s:cyan = '#8abeb7'
let s:blue = '#81a2be'
let s:magenta = '#b294bb'
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ]
let s:p.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ]
let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base00, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ]
let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ]
let s:p.replace.left = [ [ s:base02, s:orange ], [ s:base3, s:base01 ] ]
let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base0, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base0, s:base02 ] ]
let g:lightline#colorscheme#Tomorrow_Night#palette = lightline#colorscheme#fill(s:p)

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/22 21:45:55. " Last Change: 2013/08/27 00:37:34.
" ============================================================================= " =============================================================================
let s:base03 = [ '#151513', 233 ] let s:base03 = [ '#151513', 233 ]
let s:base02 = [ '#30302c ', 236 ] let s:base02 = [ '#30302c ', 236 ]
@@ -22,14 +22,14 @@ let s:cyan = [ '#8fbfdc', 110 ]
let s:green = [ '#99ad6a', 107 ] let s:green = [ '#99ad6a', 107 ]
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}} let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] let s:p.normal.left = [ [ s:base02, 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.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ]
let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base0, s:base02 ], [ s:base0, s:base02 ] ] let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base0, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ] let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ]
let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ]
let s:p.replace.left = [ [ s:base02, s:red ], [ s:base3, s:base01 ] ] let s:p.replace.left = [ [ s:base02, s:red ], [ s:base3, s:base01 ] ]
let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base02, s:base02 ] ] let s:p.normal.middle = [ [ s:base0, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base02, s:base02 ] ] let s:p.inactive.middle = [ [ s:base00, s:base02 ] ]
function! s:flatten(p) function! s:flatten(p)
for k in values(a:p) for k in values(a:p)

View File

@@ -3,18 +3,18 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/22 08:28:55. " Last Change: 2013/08/26 17:54:24.
" ============================================================================= " =============================================================================
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}} let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
let s:p.normal.left = [ ['#0000ff', '#ffffff', 21, 231, 'bold' ], [ '#ffffff', '#0000ff', 231, 21 ], [ '#ffffff', '#0000ff', 231, 21 ] ] let s:p.normal.left = [ ['#0000ff', '#ffffff', 21, 231, 'bold' ], [ '#ffffff', '#0000ff', 231, 21 ] ]
let s:p.normal.right = [ [ '#303030', '#d0d0d0', 236, 252 ], [ '#303030', '#8a8a8a', 236, 245 ], [ '#bcbcbc', '#585858', 250, 240 ] ] let s:p.normal.right = [ [ '#303030', '#d0d0d0', 236, 252 ], [ '#303030', '#8a8a8a', 236, 245 ], [ '#bcbcbc', '#585858', 250, 240 ] ]
let s:p.inactive.right = [ [ '#121212', '#606060', 233, 241 ], [ '#121212', '#3a3a3a', 233, 237 ], [ '#121212', '#262626', 233, 235 ], [ '#121212', '#262626', 233, 235 ] ] let s:p.inactive.right = [ [ '#121212', '#606060', 233, 241 ], [ '#121212', '#3a3a3a', 233, 237 ], [ '#121212', '#262626', 233, 235 ] ]
let s:p.inactive.left = s:p.inactive.right[1:] let s:p.inactive.left = s:p.inactive.right[1:]
let s:p.insert.left = [ ['#005f00', '#ffffff', 22, 231, 'bold' ], [ '#ffffff', '#005f00', 231, 22 ], [ '#ffffff', '#005f00', 231, 22 ] ] let s:p.insert.left = [ ['#005f00', '#ffffff', 22, 231, 'bold' ], [ '#ffffff', '#005f00', 231, 22 ] ]
let s:p.replace.left = [ [ '#af0000', '#ffffff', 124, 231, 'bold' ], [ '#ffffff', '#af0000', 231, 124 ], [ '#ffffff', '#af0000', 231, 124 ] ] let s:p.replace.left = [ [ '#af0000', '#ffffff', 124, 231, 'bold' ], [ '#ffffff', '#af0000', 231, 124 ] ]
let s:p.visual.left = [ [ '#5f00ff', '#ffffff', 57, 231, 'bold' ], [ '#ffffff', '#5f00ff', 231, 57 ], [ '#ffffff', '#5f00ff', 231, 57 ] ] let s:p.visual.left = [ [ '#5f00ff', '#ffffff', 57, 231, 'bold' ], [ '#ffffff', '#5f00ff', 231, 57 ] ]
let s:p.normal.middle = [ [ '#ffffff', '#303030', 231, 236 ] ] let s:p.normal.middle = [ [ '#8a8a8a', '#303030', 245, 236 ] ]
let s:p.inactive.middle = [ [ '#303030', '#121212', 236, 233 ] ] let s:p.inactive.middle = [ [ '#303030', '#121212', 236, 233 ] ]
let g:lightline#colorscheme#landscape#palette = s:p let g:lightline#colorscheme#landscape#palette = s:p

View File

@@ -3,19 +3,21 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/22 05:59:58. " Last Change: 2013/08/27 00:18:01.
" ============================================================================= " =============================================================================
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}} let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
let s:p.normal.left = [ ['darkestgreen', 'brightgreen', 'bold'], ['white', 'gray4'] ] let s:p.normal.left = [ ['darkestgreen', 'brightgreen', 'bold'], ['white', 'gray4'] ]
let s:p.normal.right = [ ['gray6', 'gray10'], ['gray9', 'gray4'], ['gray8', 'gray2'] ] let s:p.normal.right = [ ['gray5', 'gray10'], ['gray9', 'gray4'], ['gray8', 'gray2'] ]
let s:p.inactive.right = [ ['gray1', 'gray5'], ['gray4', 'gray1'], ['gray4', 'gray0'] ] let s:p.inactive.right = [ ['gray1', 'gray5'], ['gray4', 'gray1'], ['gray4', 'gray0'] ]
let s:p.inactive.left = s:p.inactive.right[1:] let s:p.inactive.left = s:p.inactive.right[1:]
let s:p.insert.left = [ ['darkestcyan', 'white', 'bold'], ['white', 'darkblue'] ] let s:p.insert.left = [ ['darkestcyan', 'white', 'bold'], ['white', 'darkblue'] ]
let s:p.insert.right = [ [ 'darkestcyan', 'gray10' ], [ 'mediumcyan', 'darkblue' ], [ 'mediumcyan', 'darkestblue' ] ] let s:p.insert.right = [ [ 'darkestcyan', 'mediumcyan' ], [ 'mediumcyan', 'darkblue' ], [ 'mediumcyan', 'darkestblue' ] ]
let s:p.replace.left = [ ['white', 'brightred', 'bold'], ['white', 'gray4'] ] let s:p.replace.left = [ ['white', 'brightred', 'bold'], ['white', 'gray4'] ]
let s:p.visual.left = [ ['darkred', 'brightorange', 'bold'], ['white', 'gray4'] ] let s:p.visual.left = [ ['darkred', 'brightorange', 'bold'], ['white', 'gray4'] ]
let s:p.normal.middle = [ [ 'gray6', 'gray2' ] ] let s:p.normal.middle = [ [ 'gray6', 'gray2' ] ]
let s:p.insert.middle = [ [ 'darkcyan', 'darkestblue' ] ] let s:p.insert.middle = [ [ 'mediumcyan', 'darkestblue' ] ]
let s:p.replace.middle = s:p.normal.middle
let s:p.replace.right = s:p.normal.right
let g:lightline#colorscheme#powerline#palette = lightline#colorscheme#fill(s:p) let g:lightline#colorscheme#powerline#palette = lightline#colorscheme#fill(s:p)

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/22 21:45:29. " Last Change: 2013/08/27 00:35:38.
" ============================================================================= " =============================================================================
let s:base03 = [ '#002b36', 234 ] let s:base03 = [ '#002b36', 234 ]
let s:base02 = [ '#073642', 235 ] let s:base02 = [ '#073642', 235 ]
@@ -29,14 +29,14 @@ if &background ==# 'light'
endif endif
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}} 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.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.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ]
let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base0, s:base02 ], [ s:base0, s:base02 ] ] let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base00, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ] let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ]
let s:p.insert.left = [ [ s:base3, s:green ], [ s:base3, s:base01 ] ] 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.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.visual.left = [ [ s:base3, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base02, s:base02 ] ] let s:p.normal.middle = [ [ s:base00, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base02, s:base02 ] ] let s:p.inactive.middle = [ [ s:base00, s:base02 ] ]
function! s:flatten(p) function! s:flatten(p)
for k in values(a:p) for k in values(a:p)
@@ -49,4 +49,3 @@ function! s:flatten(p)
return a:p return a:p
endfunction endfunction
let g:lightline#colorscheme#solarized#palette = s:flatten(s:p) let g:lightline#colorscheme#solarized#palette = s:flatten(s:p)

View File

@@ -3,7 +3,7 @@
" Version: 0.0 " Version: 0.0
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2013/08/22 21:44:14. " Last Change: 2013/08/27 00:41:15.
" ============================================================================= " =============================================================================
let s:base03 = [ '#242424', 235 ] let s:base03 = [ '#242424', 235 ]
let s:base023 = [ '#353535 ', 236 ] let s:base023 = [ '#353535 ', 236 ]
@@ -11,7 +11,7 @@ let s:base02 = [ '#444444 ', 238 ]
let s:base01 = [ '#585858', 240 ] let s:base01 = [ '#585858', 240 ]
let s:base00 = [ '#666666', 242 ] let s:base00 = [ '#666666', 242 ]
let s:base0 = [ '#808080', 244 ] let s:base0 = [ '#808080', 244 ]
let s:base1 = [ '#949494', 246 ] let s:base1 = [ '#969696', 247 ]
let s:base2 = [ '#a8a8a8', 248 ] let s:base2 = [ '#a8a8a8', 248 ]
let s:base3 = [ '#d0d0d0', 252 ] let s:base3 = [ '#d0d0d0', 252 ]
let s:yellow = [ '#cae682', 180 ] let s:yellow = [ '#cae682', 180 ]
@@ -23,13 +23,13 @@ let s:cyan = s:blue
let s:green = [ '#95e454', 119 ] let s:green = [ '#95e454', 119 ]
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}} let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}}
let s:p.normal.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ] let s:p.normal.left = [ [ s:base02, 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.normal.right = [ [ s:base02, s:base0 ], [ s:base1, s:base01 ] ]
let s:p.inactive.right = [ [ s:base02, s:base01 ], [ s:base0, s:base02 ], [ s:base0, s:base02 ] ] let s:p.inactive.right = [ [ s:base023, s:base01 ], [ s:base00, s:base02 ] ]
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base03 ] ] let s:p.inactive.left = [ [ s:base1, s:base02 ], [ s:base00, s:base023 ] ]
let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] let s:p.insert.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ]
let s:p.replace.left = [ [ s:base02, s:red ], [ s:base3, s:base01 ] ] let s:p.replace.left = [ [ s:base02, s:red ], [ s:base3, s:base01 ] ]
let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] let s:p.visual.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ]
let s:p.normal.middle = [ [ s:base02, s:base02 ] ] let s:p.normal.middle = [ [ s:base1, s:base02 ] ]
let s:p.inactive.middle = [ [ s:base03, s:base023 ] ] let s:p.inactive.middle = [ [ s:base03, s:base023 ] ]
function! s:flatten(p) function! s:flatten(p)