From 2bedd8ef840b5f0fce472cff61a72fe13a425095 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sun, 4 Aug 2013 16:18:05 +0000 Subject: [PATCH] first pass at tomorrow themes (#67, #113) --- autoload/airline/themes/jellybeans.vim | 76 ++++++++++++++------------ autoload/airline/themes/tomorrow.vim | 37 +++++++++++++ 2 files changed, 79 insertions(+), 34 deletions(-) create mode 100644 autoload/airline/themes/tomorrow.vim diff --git a/autoload/airline/themes/jellybeans.vim b/autoload/airline/themes/jellybeans.vim index 6fa6dff8..91e95ef8 100644 --- a/autoload/airline/themes/jellybeans.vim +++ b/autoload/airline/themes/jellybeans.vim @@ -1,39 +1,47 @@ -" This theme is an example of how to use helper functions to extract highlight -" values from the corresponding colorscheme. It was written in a hurry, so it -" is very minimalistic. If you are a jellybeans user and want to make updates, -" please send pull requests. +function! s:generate() + " This theme is an example of how to use helper functions to extract highlight + " values from the corresponding colorscheme. It was written in a hurry, so it + " is very minimalistic. If you are a jellybeans user and want to make updates, + " please send pull requests. -" Here are examples where the entire highlight group is copied and an airline -" compatible color array is generated. -let s:file = airline#themes#get_highlight('Constant') -let s:N1 = airline#themes#get_highlight('DbgCurrent', 'bold') -let s:N2 = airline#themes#get_highlight('Folded') -let s:N3 = airline#themes#get_highlight('NonText') -let g:airline#themes#jellybeans#normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3, s:file) -let g:airline#themes#jellybeans#normal_modified = { - \ 'statusline': [ '#ffb964', '', 215, '', '' ] - \ } + " Here are examples where the entire highlight group is copied and an airline + " compatible color array is generated. + let s:file = airline#themes#get_highlight('Constant') + let s:N1 = airline#themes#get_highlight('DbgCurrent', 'bold') + let s:N2 = airline#themes#get_highlight('Folded') + let s:N3 = airline#themes#get_highlight('NonText') + let g:airline#themes#jellybeans#normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3, s:file) + let g:airline#themes#jellybeans#normal_modified = { + \ 'statusline': [ '#ffb964', '', 215, '', '' ] + \ } -let s:I1 = airline#themes#get_highlight('DiffAdd', 'bold') -let s:I2 = s:N2 -let s:I3 = s:N3 -let g:airline#themes#jellybeans#insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3, s:file) -let g:airline#themes#jellybeans#insert_modified = g:airline#themes#jellybeans#normal_modified + let s:I1 = airline#themes#get_highlight('DiffAdd', 'bold') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#jellybeans#insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3, s:file) + let g:airline#themes#jellybeans#insert_modified = g:airline#themes#jellybeans#normal_modified -let s:R1 = airline#themes#get_highlight('WildMenu', 'bold') -let s:R2 = s:N2 -let s:R3 = s:N3 -let g:airline#themes#jellybeans#replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3, s:file) -let g:airline#themes#jellybeans#replace_modified = g:airline#themes#jellybeans#normal_modified + let s:R1 = airline#themes#get_highlight('WildMenu', 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#jellybeans#replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3, s:file) + let g:airline#themes#jellybeans#replace_modified = g:airline#themes#jellybeans#normal_modified -" Sometimes you want to mix and match colors from different groups, you can do -" that with this method. -let s:V1 = airline#themes#get_highlight2(['TabLineSel', 'bg'], ['DiffDelete', 'bg'], 'bold') -let s:V2 = s:N2 -let s:V3 = s:N3 -let g:airline#themes#jellybeans#visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3, s:file) -let g:airline#themes#jellybeans#visual_modified = g:airline#themes#jellybeans#normal_modified + " Sometimes you want to mix and match colors from different groups, you can do + " that with this method. + let s:V1 = airline#themes#get_highlight2(['TabLineSel', 'bg'], ['DiffDelete', 'bg'], 'bold') + let s:V2 = s:N2 + let s:V3 = s:N3 + let g:airline#themes#jellybeans#visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3, s:file) + let g:airline#themes#jellybeans#visual_modified = g:airline#themes#jellybeans#normal_modified -" 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) + " 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) +endfunction + +call s:generate() +augroup airline_jellybeans + autocmd! + autocmd ColorScheme * call generate() +augroup END diff --git a/autoload/airline/themes/tomorrow.vim b/autoload/airline/themes/tomorrow.vim new file mode 100644 index 00000000..7f532bfe --- /dev/null +++ b/autoload/airline/themes/tomorrow.vim @@ -0,0 +1,37 @@ +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 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') + \ } + + let s:I1 = airline#themes#get_highlight('Search', 'bold') + let s:I2 = s:N2 + let s:I3 = s:N3 + let g:airline#themes#tomorrow#insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3, s:file) + let g:airline#themes#tomorrow#insert_modified = g:airline#themes#tomorrow#normal_modified + + let s:R1 = airline#themes#get_highlight('Error', 'bold') + let s:R2 = s:N2 + let s:R3 = s:N3 + let g:airline#themes#tomorrow#replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3, s:file) + let g:airline#themes#tomorrow#replace_modified = g:airline#themes#tomorrow#normal_modified + + let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Constant', 'fg'], 'bold') + let s:V2 = s:N2 + let s:V3 = s:N3 + 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 g:airline#themes#tomorrow#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) +endfunction + +call s:generate() +augroup airline_tomorrow + autocmd! + autocmd ColorScheme * call generate() +augroup END