diff --git a/doc/airline.txt b/doc/airline.txt index bfc5eea..8277501 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -136,7 +136,10 @@ COMMANDS *airline-commands* Toggles whitespace detection. :AirlineToggle *:AirlineToggle* - Toggles between the standard 'statusline' + Toggles between the standard 'statusline' and airline. + +:AirlineRefresh *:AirlineRefresh* + Refreshes all highlight groups. ============================================================================== CUSTOMIZATION *airline-customization* diff --git a/plugin/airline.vim b/plugin/airline.vim index d0eec0f..1292c96 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -98,6 +98,7 @@ endfunction command! -nargs=? -complete=customlist,get_airline_themes AirlineTheme call airline_theme() command! AirlineToggleWhitespace call airline#extensions#whitespace#toggle() command! AirlineToggle call airline_toggle() +command! AirlineRefresh call airline#load_theme() call airline_toggle() diff --git a/t/commands.vim b/t/commands.vim index 98a9bfd..b56b881 100644 --- a/t/commands.vim +++ b/t/commands.vim @@ -25,5 +25,9 @@ describe 'commands' execute 'AirlineTheme dark' Expect g:airline_theme == 'dark' end + + it 'should have a refresh command' + Expect exists(':AirlineRefresh') to_be_true + end end