add g:airline_extensions variable for manual loading

This commit is contained in:
Bailey Ling 2015-02-28 17:40:23 -05:00
parent 51095bad95
commit 50e47ced42
2 changed files with 16 additions and 0 deletions

View File

@ -121,6 +121,13 @@ function! airline#extensions#load()
" non-trivial number of external plugins use eventignore=all, so we need to account for that
autocmd CursorMoved * call <sid>sync_active_winnr()
if exists('g:airline_extensions')
for ext in g:airline_extensions
call airline#extensions#{ext}#init(s:ext)
endfor
return
endif
call airline#extensions#quickfix#init(s:ext)
if get(g:, 'loaded_unite', 0)

View File

@ -242,6 +242,15 @@ cost. You can disable the check with the following flag. >
Note: Third party plugins that rely on this behavior will be affected. You
will need to manually load them.
Alternatively, if you want a minimalistic setup and would rather opt-in which
extensions get loaded instead of disabling each individually, you can declare
the following list variable: >
" an empty list disables all extensions
let g:airline_extensions = []
" or only load what you want
let g:airline_extensions = ['branch', 'tabline']
<
------------------------------------- *airline-default*
The default extension understands all of the `g:` variables in the
|airline-configuration| section, however it also has some more fine-tuned