From 26c7c9fca270b899db87f7f4f91f38a1898f44bd Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Tue, 6 Aug 2013 23:29:06 +0000 Subject: [PATCH] move default ctrlp theme to dark. autogenerate for everything else if not already defined. --- autoload/airline/extensions/ctrlp.vim | 6 +++--- autoload/airline/themes/badwolf.vim | 3 --- autoload/airline/themes/bubblegum.vim | 3 --- autoload/airline/themes/dark.vim | 11 +++++++++++ autoload/airline/themes/jellybeans.vim | 4 ---- autoload/airline/themes/light.vim | 3 --- autoload/airline/themes/simple.vim | 3 --- autoload/airline/themes/solarized.vim | 7 ------- autoload/airline/themes/tomorrow.vim | 4 ---- 9 files changed, 14 insertions(+), 30 deletions(-) diff --git a/autoload/airline/extensions/ctrlp.vim b/autoload/airline/extensions/ctrlp.vim index b5f0ea3..d17ce2f 100644 --- a/autoload/airline/extensions/ctrlp.vim +++ b/autoload/airline/extensions/ctrlp.vim @@ -17,9 +17,9 @@ function! airline#extensions#ctrlp#load_theme() let theme = g:airline#themes#{g:airline_theme}#ctrlp else let theme = airline#extensions#ctrlp#generate_color_map( - \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], - \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], - \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) + \ g:airline#themes#{g:airline_theme}#insert['statusline'], + \ g:airline#themes#{g:airline_theme}#insert['info'], + \ g:airline#themes#{g:airline_theme}#insert['mode']) endif for key in keys(theme) call airline#exec_highlight(key, theme[key]) diff --git a/autoload/airline/themes/badwolf.vim b/autoload/airline/themes/badwolf.vim index 51824e0..94b97f8 100644 --- a/autoload/airline/themes/badwolf.vim +++ b/autoload/airline/themes/badwolf.vim @@ -52,6 +52,3 @@ let g:airline#themes#badwolf#inactive = airline#themes#generate_color_map(s:IA, let g:airline#themes#badwolf#inactive_modified = { \ 'statusline' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } -if get(g:, 'loaded_ctrlp', 0) - let g:airline#themes#badwolf#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:I2, s:I1) -endif diff --git a/autoload/airline/themes/bubblegum.vim b/autoload/airline/themes/bubblegum.vim index f2c1759..f6e3d0c 100644 --- a/autoload/airline/themes/bubblegum.vim +++ b/autoload/airline/themes/bubblegum.vim @@ -62,6 +62,3 @@ let g:airline#themes#bubblegum#inactive_modified = { \ 'statusline': [s:gui_orange, '', s:cterm_orange, '', ''], \ } -if get(g:, 'loaded_ctrlp', 0) - let g:airline#themes#bubblegum#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:I1) -endif diff --git a/autoload/airline/themes/dark.vim b/autoload/airline/themes/dark.vim index 54e8e8d..f3f9dd6 100644 --- a/autoload/airline/themes/dark.vim +++ b/autoload/airline/themes/dark.vim @@ -85,3 +85,14 @@ let g:airline#themes#dark#inactive_modified = { \ 'statusline': [ '#5f005f' , '' , '53' , '' , '' ] , \ } + +" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp +" variable so that related functionality is loaded iff the user is using +" ctrlp. Note that this is optional, and if you do not define ctrlp colors +" they will be chosen automatically from the existing palette. +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#dark#ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], + \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], + \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) +endif diff --git a/autoload/airline/themes/jellybeans.vim b/autoload/airline/themes/jellybeans.vim index 3828b25..91e95ef 100644 --- a/autoload/airline/themes/jellybeans.vim +++ b/autoload/airline/themes/jellybeans.vim @@ -38,10 +38,6 @@ 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#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) - - if get(g:, 'loaded_ctrlp', 0) - let g:airline#themes#jellybeans#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:I1) - endif endfunction call s:generate() diff --git a/autoload/airline/themes/light.vim b/autoload/airline/themes/light.vim index 7039a4e..cba9186 100644 --- a/autoload/airline/themes/light.vim +++ b/autoload/airline/themes/light.vim @@ -45,6 +45,3 @@ let g:airline#themes#light#inactive_modified = { \ 'statusline': [ '#df0000' , '' , '160' , '', '' ] \ } -if get(g:, 'loaded_ctrlp', 0) - let g:airline#themes#light#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:I2, s:I1) -endif diff --git a/autoload/airline/themes/simple.vim b/autoload/airline/themes/simple.vim index 99d0243..460665a 100644 --- a/autoload/airline/themes/simple.vim +++ b/autoload/airline/themes/simple.vim @@ -100,6 +100,3 @@ let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] let g:airline#themes#simple#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) let g:airline#themes#simple#inactive_modified = copy(g:airline#themes#simple#normal_modified) -if get(g:, 'loaded_ctrlp', 0) - let g:airline#themes#simple#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:I1) -endif diff --git a/autoload/airline/themes/solarized.vim b/autoload/airline/themes/solarized.vim index 9c5fc03..720b02a 100644 --- a/autoload/airline/themes/solarized.vim +++ b/autoload/airline/themes/solarized.vim @@ -163,13 +163,6 @@ function! s:generate() \ s:VM.info_separator[0].t, s:VM.info_separator[1].t, s:VM.info_separator[2]], \ 'statusline': [s:VM.statusline[0].g, s:VM.statusline[1].g, \ s:VM.statusline[0].t, s:VM.statusline[1].t, s:VM.statusline[2]]} - - if get(g:, 'loaded_ctrlp', 0) - let g:airline#themes#solarized#ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [s:I3[0].g, s:I3[1].g, s:I3[0].t, s:I3[1].t, s:I3[2]], - \ [s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]], - \ [s:I1[0].g, s:I1[1].g, s:I1[0].t, s:I1[1].t, s:I1[2]]) - endif endfunction call s:generate() diff --git a/autoload/airline/themes/tomorrow.vim b/autoload/airline/themes/tomorrow.vim index e727e82..b188681 100644 --- a/autoload/airline/themes/tomorrow.vim +++ b/autoload/airline/themes/tomorrow.vim @@ -31,10 +31,6 @@ function! s:generate() 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) - - if get(g:, 'loaded_ctrlp', 0) - let g:airline#themes#tomorrow#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:V1) - endif endfunction call s:generate()