Merge pull request #1059 from chrisbra/base16_tomorrow

Fix matching of themes to color names
This commit is contained in:
Christian Brabandt 2016-02-25 16:25:05 +01:00
commit ff0f7df41f
2 changed files with 6 additions and 7 deletions

View File

@ -71,7 +71,7 @@ endfunction
function! airline#switch_matching_theme() function! airline#switch_matching_theme()
if exists('g:colors_name') if exists('g:colors_name')
let existing = g:airline_theme let existing = substitute(g:airline_theme, '-', '_', 'g')
try try
let palette = g:airline#themes#{g:colors_name}#palette let palette = g:airline#themes#{g:colors_name}#palette
call airline#switch_theme(g:colors_name) call airline#switch_theme(g:colors_name)

View File

@ -47,13 +47,12 @@ function! airline#init#bootstrap()
call s:check_defined('g:airline_theme_map', {}) call s:check_defined('g:airline_theme_map', {})
call extend(g:airline_theme_map, { call extend(g:airline_theme_map, {
\ 'Tomorrow.*': 'tomorrow', \ '\CTomorrow': 'tomorrow',
\ 'base16.*': 'base16', \ 'base16': 'base16',
\ 'bubblegum': 'bubblegum',
\ 'mo[l|n]okai': 'molokai', \ 'mo[l|n]okai': 'molokai',
\ 'wombat.*': 'wombat', \ 'wombat': 'wombat',
\ '.*zenburn.*': 'zenburn', \ 'zenburn': 'zenburn',
\ '.*solarized.*': 'solarized', \ 'solarized': 'solarized',
\ }, 'keep') \ }, 'keep')
call s:check_defined('g:airline_symbols', {}) call s:check_defined('g:airline_symbols', {})