diff --git a/README.md b/README.md index 3f799fa2..4d1dc1d5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/autoload/airline/themes.vim b/autoload/airline/themes.vim index ed71eb37..668f8eb4 100644 --- a/autoload/airline/themes.vim +++ b/autoload/airline/themes.vim @@ -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, ...) diff --git a/autoload/airline/themes/tomorrow.vim b/autoload/airline/themes/tomorrow.vim index 7f532bfe..467ec2a9 100644 --- a/autoload/airline/themes/tomorrow.vim +++ b/autoload/airline/themes/tomorrow.vim @@ -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 diff --git a/doc/airline.txt b/doc/airline.txt index a06b2c51..83db7055 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -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 >