From 7f81f102ab53985b0f1d19c4be6d13fb359c13b4 Mon Sep 17 00:00:00 2001 From: Yukun Lin Date: Sat, 10 Aug 2019 19:54:05 +0900 Subject: [PATCH] Add 'g:airline_solarized_dark_inactive_background' option for solarized.vim Increases contrast to make it easier to distinguish between active and inactive buffers. --- autoload/airline/themes/solarized.vim | 3 ++- doc/airline-themes.txt | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/airline/themes/solarized.vim b/autoload/airline/themes/solarized.vim index 702eda9..caf1196 100644 --- a/autoload/airline/themes/solarized.vim +++ b/autoload/airline/themes/solarized.vim @@ -7,6 +7,7 @@ function! airline#themes#solarized#refresh() 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:use_green = get(g:, 'airline_solarized_normal_green', 0) + let s:dark_inactive_tab = get(g:, 'airline_solarized_dark_inactive_background', 0) let s:dark_text = get(g:, 'airline_solarized_dark_text', 0) let s:dark_inactive_border = get(g:, 'airline_solarized_dark_inactive_border', 0) let s:tty = &t_Co == 8 @@ -198,7 +199,7 @@ function! airline#themes#solarized#refresh() let g:airline#themes#solarized#palette.tabline = {} let g:airline#themes#solarized#palette.tabline.airline_tab = [ - \ s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]] + \ s:I2[0].g, s:I2[1].g, s:I2[0].t, (s:dark_inactive_tab ? s:I3[0].t : s:I2[1].t), s:I2[2]] let g:airline#themes#solarized#palette.tabline.airline_tabtype = [ \ s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]] diff --git a/doc/airline-themes.txt b/doc/airline-themes.txt index f41c2c9..0e7d74f 100644 --- a/doc/airline-themes.txt +++ b/doc/airline-themes.txt @@ -243,6 +243,12 @@ be shown in a nice orange. > Turns the outer-most section of the statusline Solarized green, making it look more like classic powerline in normal mode. To enable it: > let g:airline_solarized_normal_green = 1 +< + *airline_solarized_dark_inactive_background* + +For buffer(s) in the tabline that are displayed in an inactive window pane, +use a darker background for the buffer display in the tabline. To enable it: > + let g:airline_solarized_dark_inactive_background = 1 < *g:airline_solarized_dark_text*