mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 14:49:06 +08:00
add g:airline_extensions variable for manual loading
This commit is contained in:
parent
51095bad95
commit
50e47ced42
|
@ -121,6 +121,13 @@ function! airline#extensions#load()
|
||||||
" non-trivial number of external plugins use eventignore=all, so we need to account for that
|
" non-trivial number of external plugins use eventignore=all, so we need to account for that
|
||||||
autocmd CursorMoved * call <sid>sync_active_winnr()
|
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)
|
call airline#extensions#quickfix#init(s:ext)
|
||||||
|
|
||||||
if get(g:, 'loaded_unite', 0)
|
if get(g:, 'loaded_unite', 0)
|
||||||
|
|
|
@ -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
|
Note: Third party plugins that rely on this behavior will be affected. You
|
||||||
will need to manually load them.
|
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*
|
------------------------------------- *airline-default*
|
||||||
The default extension understands all of the `g:` variables in the
|
The default extension understands all of the `g:` variables in the
|
||||||
|airline-configuration| section, however it also has some more fine-tuned
|
|airline-configuration| section, however it also has some more fine-tuned
|
||||||
|
|
Loading…
Reference in New Issue
Block a user