From 210a9749801ca7d646f4aac390417bc7d279bf14 Mon Sep 17 00:00:00 2001 From: Pychimp Date: Thu, 5 Sep 2013 22:31:36 +0530 Subject: [PATCH 1/7] creating tabline theme WORK IN PROGRESS !! --- autoload/airline/themes/luna.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autoload/airline/themes/luna.vim b/autoload/airline/themes/luna.vim index 6ec9543..8311a6c 100644 --- a/autoload/airline/themes/luna.vim +++ b/autoload/airline/themes/luna.vim @@ -49,3 +49,13 @@ let g:airline#themes#luna#palette.ctrlp = airline#extensions#ctrlp#generate_colo \ [ '#ffffff' , '#002b2b' , 231 , 23 , '' ] , \ [ '#ffffff' , '#005252' , 231 , 36 , '' ] , \ [ '#ffffff' , '#973d45' , 231 , 95 , '' ] ) + +let g:airline#themes#luna#palette.tabline = { + \ 'airline_tab': ['#2aa198', '#003f3f', 88, 208, ''], + \ 'airline_tabsel': ['#ffffff', '#787800', 88, 208, ''], + \ 'airline_tabtype': ['#2aa198', '#003f3f', 88, 208, ''], + \ 'airline_tabfill': ['#ffffff', '#002b2b', 88, 208, ''], + \ 'airline_tabmod': ['#ffffff', '#780000', 88, 208, ''], + \ } + +" 'airline_tabsel': ['#ffffff', '#3d9762', 88, 208, ''], From a1eca0a06a1a4ec78b357285c1db23f7c3f3c0ff Mon Sep 17 00:00:00 2001 From: Pychimp Date: Fri, 6 Sep 2013 21:28:21 +0530 Subject: [PATCH 2/7] Luna theme support for Tabline Slightly better theming, than the automatically genenrated one by Airline. --- autoload/airline/themes/luna.vim | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/autoload/airline/themes/luna.vim b/autoload/airline/themes/luna.vim index 8311a6c..5bab228 100644 --- a/autoload/airline/themes/luna.vim +++ b/autoload/airline/themes/luna.vim @@ -51,11 +51,9 @@ let g:airline#themes#luna#palette.ctrlp = airline#extensions#ctrlp#generate_colo \ [ '#ffffff' , '#973d45' , 231 , 95 , '' ] ) let g:airline#themes#luna#palette.tabline = { - \ 'airline_tab': ['#2aa198', '#003f3f', 88, 208, ''], - \ 'airline_tabsel': ['#ffffff', '#787800', 88, 208, ''], - \ 'airline_tabtype': ['#2aa198', '#003f3f', 88, 208, ''], - \ 'airline_tabfill': ['#ffffff', '#002b2b', 88, 208, ''], - \ 'airline_tabmod': ['#ffffff', '#780000', 88, 208, ''], + \ 'airline_tab': ['#2aa198', '#003f3f', 231, 29, ''], + \ 'airline_tabsel': ['#ffffff', '#2e8b57', 231, 36, ''], + \ 'airline_tabtype': ['#ffffff', '#005252', 231, 36, ''], + \ 'airline_tabfill': ['#ffffff', '#002b2b', 231, 23, ''], + \ 'airline_tabmod': ['#ffffff', '#780000', 231, 88, ''], \ } - -" 'airline_tabsel': ['#ffffff', '#3d9762', 88, 208, ''], From 29972ef8576de15de4403d2f518c91525ccd594e Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Thu, 5 Sep 2013 20:45:12 +0000 Subject: [PATCH 3/7] basic working independent inactive modified highlights. --- autoload/airline.vim | 28 +++++++++++++++++++------ autoload/airline/extensions/default.vim | 2 +- autoload/airline/themes/dark.vim | 3 +++ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 5d09e47..bbea8b8 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -66,7 +66,7 @@ endfunction function! airline#update_statusline() for nr in filter(range(1, winnr('$')), 'v:val != winnr()') call setwinvar(nr, 'airline_active', 0) - let context = { 'winnr': nr, 'active': 0 } + let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } call s:invoke_funcrefs(context, s:inactive_funcrefs) endfor @@ -77,7 +77,7 @@ function! airline#update_statusline() endfor let w:airline_active = 1 - let context = { 'winnr': winnr(), 'active': 1 } + let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) endfunction @@ -96,10 +96,12 @@ function! s:invoke_funcrefs(context, funcrefs) endfunction function! airline#statusline(winnr) - return '%{airline#check_mode()}'.s:contexts[a:winnr].line + return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line endfunction -function! airline#check_mode() +function! airline#check_mode(winnr) + let context = s:contexts[a:winnr] + if get(w:, 'airline_active', 1) let l:m = mode() if l:m ==# "i" @@ -117,9 +119,23 @@ function! airline#check_mode() let w:airline_current_mode = get(g:airline_mode_map, '__') endif - if g:airline_detect_modified && &modified - call add(l:mode, 'modified') + if g:airline_detect_modified + if &modified + call add(l:mode, 'modified') + let colors = g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_b + else + let colors = g:airline#themes#{g:airline_theme}#palette.inactive.airline_b + endif + + for winnr in range(1, winnr('$')) + if winnr != a:winnr + \ && has_key(s:contexts, winnr) + \ && s:contexts[winnr].bufnr == context.bufnr + call airline#highlighter#exec('airline_b'.(context.bufnr).'_inactive', colors) + endif + endfor endif + if g:airline_detect_paste && &paste call add(l:mode, 'paste') endif diff --git a/autoload/airline/extensions/default.vim b/autoload/airline/extensions/default.vim index 5cbfcba..6829a84 100644 --- a/autoload/airline/extensions/default.vim +++ b/autoload/airline/extensions/default.vim @@ -48,7 +48,7 @@ function! airline#extensions#default#apply(builder, context) if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) call build_sections(a:builder, a:context, s:layout[0]) else - call a:builder.add_section('airline_b', ' %f%m ') + call a:builder.add_section('airline_b'.(a:context.bufnr), ' %f%m ') call a:builder.add_section('airline_c', '') endif diff --git a/autoload/airline/themes/dark.vim b/autoload/airline/themes/dark.vim index 74e39fa..71f8b6f 100644 --- a/autoload/airline/themes/dark.vim +++ b/autoload/airline/themes/dark.vim @@ -84,6 +84,9 @@ let s:IA1 = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ] let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] let g:airline#themes#dark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3, s:file) +let g:airline#themes#dark#palette.inactive_modified = { + \ 'airline_b': [ '#875faf' , '' , 97 , '' , '' ] , + \ } " Here we define the color map for ctrlp. We check for the g:loaded_ctrlp From 3c49b9cf3de726a399c58233a2023b54ab93fe32 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Thu, 5 Sep 2013 20:47:38 +0000 Subject: [PATCH 4/7] use airline_c for better predicability. --- autoload/airline.vim | 6 +++--- autoload/airline/extensions/default.vim | 3 +-- autoload/airline/themes/dark.vim | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index bbea8b8..d7b2b13 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -122,16 +122,16 @@ function! airline#check_mode(winnr) if g:airline_detect_modified if &modified call add(l:mode, 'modified') - let colors = g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_b + let colors = g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c else - let colors = g:airline#themes#{g:airline_theme}#palette.inactive.airline_b + let colors = g:airline#themes#{g:airline_theme}#palette.inactive.airline_c endif for winnr in range(1, winnr('$')) if winnr != a:winnr \ && has_key(s:contexts, winnr) \ && s:contexts[winnr].bufnr == context.bufnr - call airline#highlighter#exec('airline_b'.(context.bufnr).'_inactive', colors) + call airline#highlighter#exec('airline_c'.(context.bufnr).'_inactive', colors) endif endfor endif diff --git a/autoload/airline/extensions/default.vim b/autoload/airline/extensions/default.vim index 6829a84..db3384a 100644 --- a/autoload/airline/extensions/default.vim +++ b/autoload/airline/extensions/default.vim @@ -48,8 +48,7 @@ function! airline#extensions#default#apply(builder, context) if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) call build_sections(a:builder, a:context, s:layout[0]) else - call a:builder.add_section('airline_b'.(a:context.bufnr), ' %f%m ') - call a:builder.add_section('airline_c', '') + call a:builder.add_section('airline_c'.(a:context.bufnr), ' %f%m ') endif call a:builder.split(s:get_section(winnr, 'gutter', '', '')) diff --git a/autoload/airline/themes/dark.vim b/autoload/airline/themes/dark.vim index 71f8b6f..62522b1 100644 --- a/autoload/airline/themes/dark.vim +++ b/autoload/airline/themes/dark.vim @@ -85,7 +85,7 @@ let s:IA2 = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ] let s:IA3 = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ] let g:airline#themes#dark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3, s:file) let g:airline#themes#dark#palette.inactive_modified = { - \ 'airline_b': [ '#875faf' , '' , 97 , '' , '' ] , + \ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] , \ } From 46db9b9bdf4aabf6e89d36df364c98f8467779f0 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Thu, 5 Sep 2013 21:01:08 +0000 Subject: [PATCH 5/7] check existence of inactive modified colors before using them. --- autoload/airline.vim | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index d7b2b13..5f2b540 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -122,18 +122,24 @@ function! airline#check_mode(winnr) if g:airline_detect_modified if &modified call add(l:mode, 'modified') - let colors = g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c + let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c') + \ ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c + \ : [] else - let colors = g:airline#themes#{g:airline_theme}#palette.inactive.airline_c + let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') + \ ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c + \ : [] endif - for winnr in range(1, winnr('$')) - if winnr != a:winnr - \ && has_key(s:contexts, winnr) - \ && s:contexts[winnr].bufnr == context.bufnr - call airline#highlighter#exec('airline_c'.(context.bufnr).'_inactive', colors) - endif - endfor + if !empty(colors) + for winnr in range(1, winnr('$')) + if winnr != a:winnr + \ && has_key(s:contexts, winnr) + \ && s:contexts[winnr].bufnr == context.bufnr + call airline#highlighter#exec('airline_c'.(context.bufnr).'_inactive', colors) + endif + endfor + endif endif if g:airline_detect_paste && &paste From 8b71285c6b181cacc22af9a35eb0e18d4c6436b3 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Thu, 5 Sep 2013 21:34:48 +0000 Subject: [PATCH 6/7] fill in inactive modified colors. --- autoload/airline.vim | 10 +++------- autoload/airline/themes/badwolf.vim | 2 ++ autoload/airline/themes/base16.vim | 6 ++++++ autoload/airline/themes/bubblegum.vim | 3 +++ autoload/airline/themes/jellybeans.vim | 1 + autoload/airline/themes/laederon.vim | 2 ++ autoload/airline/themes/light.vim | 3 +++ autoload/airline/themes/luna.vim | 3 +++ autoload/airline/themes/molokai.vim | 3 +++ autoload/airline/themes/simple.vim | 3 +++ autoload/airline/themes/solarized.vim | 2 ++ autoload/airline/themes/tomorrow.vim | 3 +++ autoload/airline/themes/ubaryd.vim | 2 ++ autoload/airline/themes/wombat.vim | 2 ++ autoload/airline/themes/zenburn.vim | 3 +++ 15 files changed, 41 insertions(+), 7 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 5f2b540..eb0f716 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -123,19 +123,15 @@ function! airline#check_mode(winnr) if &modified call add(l:mode, 'modified') let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c') - \ ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c - \ : [] + \ ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c : [] else let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') - \ ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c - \ : [] + \ ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c : [] endif if !empty(colors) for winnr in range(1, winnr('$')) - if winnr != a:winnr - \ && has_key(s:contexts, winnr) - \ && s:contexts[winnr].bufnr == context.bufnr + if winnr != a:winnr && has_key(s:contexts, winnr) && s:contexts[winnr].bufnr == context.bufnr call airline#highlighter#exec('airline_c'.(context.bufnr).'_inactive', colors) endif endfor diff --git a/autoload/airline/themes/badwolf.vim b/autoload/airline/themes/badwolf.vim index cc9d262..c57d693 100644 --- a/autoload/airline/themes/badwolf.vim +++ b/autoload/airline/themes/badwolf.vim @@ -44,4 +44,6 @@ let g:airline#themes#badwolf#palette.visual_modified = { let g:airline#themes#badwolf#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +let g:airline#themes#badwolf#palette.inactive_modified = { + \ 'airline_c': [ s:V1[1] , '' , s:V1[3] , '' , '' ] } diff --git a/autoload/airline/themes/base16.vim b/autoload/airline/themes/base16.vim index 3420ebc..2306fd3 100644 --- a/autoload/airline/themes/base16.vim +++ b/autoload/airline/themes/base16.vim @@ -59,6 +59,9 @@ function! s:load_constant() " Inactive window let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:cterm_dark_gray, s:cterm_med_gray_hi, ''] let g:airline#themes#base16#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) + let g:airline#themes#base16#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } endfunction function! s:load_dynamic() @@ -95,6 +98,9 @@ function! s:load_dynamic() let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg']) let g:airline#themes#base16#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) + let g:airline#themes#base16#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } endfunction if get(g:, 'airline#themes#base16#constant', 0) diff --git a/autoload/airline/themes/bubblegum.vim b/autoload/airline/themes/bubblegum.vim index 1f29376..d4d142c 100644 --- a/autoload/airline/themes/bubblegum.vim +++ b/autoload/airline/themes/bubblegum.vim @@ -58,4 +58,7 @@ let g:airline#themes#bubblegum#palette.visual_modified = copy(g:airline#themes#b " Inactive window let s:IA = [s:gui_dark_gray, s:gui_med_gray_hi, s:cterm_dark_gray, s:cterm_med_gray_hi, ''] let g:airline#themes#bubblegum#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +let g:airline#themes#bubblegum#palette.inactive_modified = { + \ 'airline_c': [s:gui_orange, '', s:cterm_orange, '', ''], + \ } diff --git a/autoload/airline/themes/jellybeans.vim b/autoload/airline/themes/jellybeans.vim index 40fc911..61072f1 100644 --- a/autoload/airline/themes/jellybeans.vim +++ b/autoload/airline/themes/jellybeans.vim @@ -41,6 +41,7 @@ function! s:generate() " And of course, you can always do it manually as well. let s:IA = [ '#444444', '#1c1c1c', 237, 234 ] let g:airline#themes#jellybeans#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) + let g:airline#themes#jellybeans#palette.inactive_modified = g:airline#themes#jellybeans#palette.normal_modified endfunction call s:generate() diff --git a/autoload/airline/themes/laederon.vim b/autoload/airline/themes/laederon.vim index d0131e1..9b37484 100644 --- a/autoload/airline/themes/laederon.vim +++ b/autoload/airline/themes/laederon.vim @@ -54,4 +54,6 @@ let g:airline#themes#laederon#palette.visual_modified = { let g:airline#themes#laederon#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +let g:airline#themes#laederon#palette.inactive_modified = { + \ 'airline_c' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } diff --git a/autoload/airline/themes/light.vim b/autoload/airline/themes/light.vim index cc84ba3..591155f 100644 --- a/autoload/airline/themes/light.vim +++ b/autoload/airline/themes/light.vim @@ -40,4 +40,7 @@ let s:IA1 = [ '#666666' , '#b2b2b2' , 242 , 249 , '' ] let s:IA2 = [ '#8a8a8a' , '#d0d0d0' , 245 , 252 , '' ] let s:IA3 = [ '#a8a8a8' , '#ffffff' , 248 , 255 , '' ] let g:airline#themes#light#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3, s:file) +let g:airline#themes#light#palette.inactive_modified = { + \ 'airline_c': [ '#df0000' , '' , 160 , '' , '' ] , + \ } diff --git a/autoload/airline/themes/luna.vim b/autoload/airline/themes/luna.vim index 5bab228..878dcf6 100644 --- a/autoload/airline/themes/luna.vim +++ b/autoload/airline/themes/luna.vim @@ -40,6 +40,9 @@ let g:airline#themes#luna#palette.visual_modified = { let s:IA = [ '#4e4e4e' , '#002b2b' , 59 , 23 , '' ] let g:airline#themes#luna#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +let g:airline#themes#luna#palette.inactive_modified = { + \ 'airline_c': [ '#450000' , '' , 52 , '' , '' ] , + \ } if !get(g:, 'loaded_ctrlp', 0) diff --git a/autoload/airline/themes/molokai.vim b/autoload/airline/themes/molokai.vim index b3c3989..040c4bf 100644 --- a/autoload/airline/themes/molokai.vim +++ b/autoload/airline/themes/molokai.vim @@ -47,6 +47,9 @@ let g:airline#themes#molokai#palette.visual_modified = { " Inactive let s:IA = [ '#1b1d1e' , '#465457' , 233 , 67 , '' ] let g:airline#themes#molokai#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +let g:airline#themes#molokai#palette.inactive_modified = { + \ 'airline_c': [ '#f8f8f0' , '' , 253 , '' , '' ] , + \ } " CtrlP diff --git a/autoload/airline/themes/simple.vim b/autoload/airline/themes/simple.vim index 7163174..f48c6c9 100644 --- a/autoload/airline/themes/simple.vim +++ b/autoload/airline/themes/simple.vim @@ -41,4 +41,7 @@ let g:airline#themes#simple#palette.visual_modified = copy(g:airline#themes#simp let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] let s:IA2 = [ '#4e4e4e' , s:guibg2 , 239 , s:termbg2 , '' ] let g:airline#themes#simple#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA2, s:IA2, s:file) +let g:airline#themes#simple#palette.inactive_modified = { + \ 'airline_c': [ '#df0000', '', 160, '', '' ] , + \ } diff --git a/autoload/airline/themes/solarized.vim b/autoload/airline/themes/solarized.vim index ad460eb..656f9ba 100644 --- a/autoload/airline/themes/solarized.vim +++ b/autoload/airline/themes/solarized.vim @@ -107,6 +107,8 @@ function! s:generate() \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], \ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]], \ s:NFa) + let g:airline#themes#solarized#palette.inactive_modified = { + \ 'airline_c': [s:NM[0].g, '', s:NM[0].t, '', s:NM[2]]} let g:airline#themes#solarized#palette.normal = airline#themes#generate_color_map( \ [s:N1[0].g, s:N1[1].g, s:N1[0].t, s:N1[1].t, s:N1[2]], diff --git a/autoload/airline/themes/tomorrow.vim b/autoload/airline/themes/tomorrow.vim index 1c96c82..e385ba7 100644 --- a/autoload/airline/themes/tomorrow.vim +++ b/autoload/airline/themes/tomorrow.vim @@ -33,6 +33,9 @@ function! s:generate() let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg']) let g:airline#themes#tomorrow#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) + let g:airline#themes#tomorrow#palette.inactive_modified = { + \ 'airline_c': [ group[0], '', group[2], '', '' ] + \ } endfunction call s:generate() diff --git a/autoload/airline/themes/ubaryd.vim b/autoload/airline/themes/ubaryd.vim index 4cc5dca..adbc636 100644 --- a/autoload/airline/themes/ubaryd.vim +++ b/autoload/airline/themes/ubaryd.vim @@ -55,4 +55,6 @@ let g:airline#themes#ubaryd#palette.visual_modified = { \ 'airline_c' : [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } let g:airline#themes#ubaryd#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +let g:airline#themes#ubaryd#palette.inactive_modified = { + \ 'airline_c' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } diff --git a/autoload/airline/themes/wombat.vim b/autoload/airline/themes/wombat.vim index ff37c82..7c6faf4 100644 --- a/autoload/airline/themes/wombat.vim +++ b/autoload/airline/themes/wombat.vim @@ -77,6 +77,8 @@ let g:airline#themes#wombat#palette.insert_paste = { let g:airline#themes#wombat#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +let g:airline#themes#wombat#palette.inactive_modified = { + \ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] } if !get(g:, 'loaded_ctrlp', 0) diff --git a/autoload/airline/themes/zenburn.vim b/autoload/airline/themes/zenburn.vim index a90e236..061fed4 100644 --- a/autoload/airline/themes/zenburn.vim +++ b/autoload/airline/themes/zenburn.vim @@ -32,6 +32,9 @@ function! s:generate() let s:IA = airline#themes#get_highlight('NonText') let g:airline#themes#zenburn#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) + let g:airline#themes#zenburn#palette.inactive_modified = { + \ 'airline_c': s:Nmod + \ } endfunction call s:generate() From 2391ed05795a9d41bf12cc0ebe2285cba02e7a56 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Thu, 5 Sep 2013 22:34:15 +0000 Subject: [PATCH 7/7] show hidden buffers with a different color. resolves #229. --- autoload/airline/extensions/tabline.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index f3e64f0..7969f6f 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -46,11 +46,13 @@ function! airline#extensions#tabline#load_theme(palette) let l:tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a) let l:tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c) let l:tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a) + let l:tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c) call airline#highlighter#exec('airline_tab', l:tab) call airline#highlighter#exec('airline_tabsel', l:tabsel) call airline#highlighter#exec('airline_tabtype', l:tabtype) call airline#highlighter#exec('airline_tabfill', l:tabfill) call airline#highlighter#exec('airline_tabmod', l:tabmod) + call airline#highlighter#exec('airline_tabhid', l:tabhid) endfunction function! s:cursormove() @@ -130,6 +132,7 @@ endfunction function! s:get_buffers() let b = airline#builder#new(s:builder_context) let cur = bufnr('%') + let tab_bufs = tabpagebuflist(tabpagenr()) for nr in s:get_buffer_list() if cur == nr if g:airline_detect_modified && getbufvar(nr, '&modified') @@ -138,7 +141,11 @@ function! s:get_buffers() let group = 'airline_tabsel' endif else - let group = 'airline_tab' + if index(tab_bufs, nr) > -1 + let group = 'airline_tab' + else + let group = 'airline_tabhid' + endif endif call b.add_section(group, '%( %{airline#extensions#tabline#get_buffer_name('.nr.')} %)') endfor