diff --git a/autoload/airline/themes/solarized2.vim b/autoload/airline/themes/solarized2.vim index 299edac8..90012f91 100644 --- a/autoload/airline/themes/solarized2.vim +++ b/autoload/airline/themes/solarized2.vim @@ -33,7 +33,7 @@ end 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] 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, ''] else let s:N3 = [s:base1.g, s:base2.g, s:base1.t, s:base2.t] diff --git a/doc/airline.txt b/doc/airline.txt index a85b9521..459f426c 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -149,6 +149,13 @@ example that you could add to your vimrc: endfunction call add(g:airline_window_override_funcrefs, function('MyPlugin')) < + +============================================================================== +COMMANDS *airline-commands* +> +:AirlineTheme {theme-name} *:AirlineTheme* + Changes the current airline theme. + ============================================================================== CONTRIBUTIONS *airline-contributions* diff --git a/plugin/airline.vim b/plugin/airline.vim index f474865d..c95dfa57 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -51,6 +51,17 @@ function! s:init() endif 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,get_airline_themes AirlineTheme call change_theme() + augroup airline au! autocmd ColorScheme * call airline#highlight(['normal'])