fix another solarized2 dark gui typo. also, add :AirlineTheme command.

This commit is contained in:
Bailey Ling 2013-07-10 19:55:55 +00:00
parent 4fc6b31a82
commit 16447a6aa9
3 changed files with 19 additions and 1 deletions

View File

@ -33,7 +33,7 @@ end
let s:N1 = [s:base2.g, s:blue.g, s:base2.t, s:blue.t, 'bold'] let s:N1 = [s:base2.g, s:blue.g, s:base2.t, s:blue.t, 'bold']
let s:N2 = [s:base2.g, s:base01.g, s:base2.t, s:base01.t] let s:N2 = [s:base2.g, s:base01.g, s:base2.t, s:base01.t]
if s:background == 'dark' if s:background == 'dark'
let s:N3 = [s:base1.g, s:base2.g, s:base1.t, s:base02.t] let s:N3 = [s:base1.g, s:base02.g, s:base1.t, s:base02.t]
let s:NF = [s:pinky.g, s:base02.g, s:pinky.t, s:base02.t, ''] let s:NF = [s:pinky.g, s:base02.g, s:pinky.t, s:base02.t, '']
else else
let s:N3 = [s:base1.g, s:base2.g, s:base1.t, s:base2.t] let s:N3 = [s:base1.g, s:base2.g, s:base1.t, s:base2.t]

View File

@ -149,6 +149,13 @@ example that you could add to your vimrc:
endfunction endfunction
call add(g:airline_window_override_funcrefs, function('MyPlugin')) call add(g:airline_window_override_funcrefs, function('MyPlugin'))
< <
==============================================================================
COMMANDS *airline-commands*
>
:AirlineTheme {theme-name} *:AirlineTheme*
Changes the current airline theme.
============================================================================== ==============================================================================
CONTRIBUTIONS *airline-contributions* CONTRIBUTIONS *airline-contributions*

View File

@ -51,6 +51,17 @@ function! s:init()
endif endif
endfunction endfunction
function! s:change_theme(name)
let g:airline_theme = a:name
let load = g:airline#themes#{a:name}#normal
call airline#highlight(['normal'])
endfunction
function! s:get_airline_themes(a, l, p)
let files = split(globpath(&rtp, "autoload/airline/themes/*"), "\n")
return map(files, 'fnamemodify(v:val, ":t:r")')
endfunction
command! -nargs=1 -complete=customlist,<sid>get_airline_themes AirlineTheme call <sid>change_theme(<f-args>)
augroup airline augroup airline
au! au!
autocmd ColorScheme * call airline#highlight(['normal']) autocmd ColorScheme * call airline#highlight(['normal'])