mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 17:57:36 +08:00
parent
2bedd8ef84
commit
a5fe4d9972
|
@ -11,7 +11,7 @@ Lean & mean statusline for vim that's light as air.
|
|||
* looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols.
|
||||
* optimized for speed; it loads in under a millisecond.
|
||||
* fully customizable; if you know a little `statusline` syntax you can tweak it to your needs.
|
||||
* trivial to write colorschemes; for a minimal theme you need to edit 9 lines of colors (please send pull requests).
|
||||
* trivial to write colorschemes; over 10 themes have been contributed.
|
||||
* supports 7.2 as the minimum Vim version
|
||||
|
||||
# Rationale
|
||||
|
|
|
@ -19,9 +19,17 @@ function! s:get_syn(group, what)
|
|||
endfunction
|
||||
|
||||
function! s:get_array(fg, bg, opts)
|
||||
let fg = a:fg
|
||||
let bg = a:bg
|
||||
if fg == '' || fg < 0
|
||||
let fg = s:get_syn('Normal', 'fg')
|
||||
endif
|
||||
if bg == '' || bg < 0
|
||||
let bg = s:get_syn('Normal', 'bg')
|
||||
endif
|
||||
return has('gui_running')
|
||||
\ ? [ a:fg, a:bg, '', '', join(a:opts, ',') ]
|
||||
\ : [ '', '', a:fg >= 0 ? a:fg : '', a:bg >= 0 ? a:bg : '', join(a:opts, ',') ]
|
||||
\ ? [ fg, bg, '', '', join(a:opts, ',') ]
|
||||
\ : [ '', '', fg, bg, join(a:opts, ',') ]
|
||||
endfunction
|
||||
|
||||
function! airline#themes#get_highlight(group, ...)
|
||||
|
|
|
@ -2,7 +2,7 @@ function! s:generate()
|
|||
let s:file = airline#themes#get_highlight('Constant')
|
||||
let s:N1 = airline#themes#get_highlight('DiffDelete', 'bold')
|
||||
let s:N2 = airline#themes#get_highlight('Pmenu')
|
||||
let s:N3 = airline#themes#get_highlight('NonText')
|
||||
let s:N3 = airline#themes#get_highlight('CursorLine')
|
||||
let g:airline#themes#tomorrow#normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3, s:file)
|
||||
let g:airline#themes#tomorrow#normal_modified = {
|
||||
\ 'statusline': airline#themes#get_highlight('vimCommand')
|
||||
|
@ -26,7 +26,7 @@ function! s:generate()
|
|||
let g:airline#themes#tomorrow#visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3, s:file)
|
||||
let g:airline#themes#tomorrow#visual_modified = g:airline#themes#tomorrow#normal_modified
|
||||
|
||||
let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['Normal', 'bg'])
|
||||
let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg'])
|
||||
let g:airline#themes#tomorrow#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file)
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ FEATURES *airline-features*
|
|||
* integrates with many popular plugins.
|
||||
* looks good with regular fonts, and provides configuration points so you
|
||||
can use unicode or powerline symbols.
|
||||
* optimized for speed; it loads in 1ms.
|
||||
* optimized for speed; it loads in under a millisecond.
|
||||
* fully customizable; if you know a little |statusline| syntax you can
|
||||
tweak it to your needs.
|
||||
* trivial to write colorschemes; for a minimal theme you need to edit
|
||||
|
@ -67,9 +67,11 @@ values):
|
|||
>
|
||||
let g:airline_detect_paste=1
|
||||
<
|
||||
|
||||
* enable iminsert detection
|
||||
>
|
||||
let g:airline_detect_iminsert=1
|
||||
<
|
||||
|
||||
* change the default theme
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue
Block a user