move all theme variables into a single dictionary

This commit is contained in:
Bailey Ling
2013-08-18 00:59:49 +00:00
parent 1584ee79f6
commit 45f0d896e9
17 changed files with 190 additions and 159 deletions

View File

@@ -48,8 +48,8 @@ function! airline#highlighter#new()
let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val')
let suffix = a:modes[0] == 'inactive' ? '_inactive' : ''
for mode in mapped
if exists('g:airline#themes#{g:airline_theme}#{mode}')
let dict = g:airline#themes#{g:airline_theme}#{mode}
if exists('g:airline#themes#{g:airline_theme}#palette[mode]')
let dict = g:airline#themes#{g:airline_theme}#palette[mode]
for kvp in items(dict)
call airline#highlighter#exec(kvp[0].suffix, kvp[1])
endfor