Extensions: indicate, if an extension is external
Show in :AirlineExtensions if the extension comes bundled with airline or from an external source. closes #1890
This commit is contained in:
parent
1fb184305b
commit
a6fb6d9da0
@ -377,6 +377,8 @@ function! airline#extensions#load()
|
|||||||
endif
|
endif
|
||||||
try
|
try
|
||||||
call airline#extensions#{name}#init(s:ext)
|
call airline#extensions#{name}#init(s:ext)
|
||||||
|
" mark as external
|
||||||
|
call add(s:loaded_ext, name.'*')
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
endif
|
endif
|
||||||
|
@ -261,6 +261,7 @@ COMMANDS *airline-commands*
|
|||||||
|
|
||||||
:AirlineExtensions *:AirlineExtensions*
|
:AirlineExtensions *:AirlineExtensions*
|
||||||
Shows the status of all available airline extensions.
|
Shows the status of all available airline extensions.
|
||||||
|
Extern means, the extensions does not come bundled with Airline.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
AUTOCOMMANDS *airline-autocommands*
|
AUTOCOMMANDS *airline-autocommands*
|
||||||
|
@ -205,11 +205,13 @@ function! s:airline_extensions()
|
|||||||
call map(files, 'fnamemodify(v:val, ":t:r")')
|
call map(files, 'fnamemodify(v:val, ":t:r")')
|
||||||
if !empty(files)
|
if !empty(files)
|
||||||
echohl Title
|
echohl Title
|
||||||
echo printf("%-15s\t%s", "Extension", "Status")
|
echo printf("%-15s\t%s\t%s", "Extension", "Extern", "Status")
|
||||||
echohl Normal
|
echohl Normal
|
||||||
endif
|
endif
|
||||||
for ext in sort(files)
|
for ext in sort(files)
|
||||||
echo printf("%-15s\t%sloaded", ext, (index(loaded, ext) == -1 ? 'not ' : ''))
|
let indx=match(loaded, '^'.ext.'\*\?$')
|
||||||
|
let external = (indx > -1 && loaded[indx] =~ '\*$')
|
||||||
|
echo printf("%-15s\t%s\t%sloaded", ext, external, indx == -1 ? 'not ' : '')
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user