mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 09:58:29 +08:00
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
|
||||
try
|
||||
call airline#extensions#{name}#init(s:ext)
|
||||
" mark as external
|
||||
call add(s:loaded_ext, name.'*')
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
|
|
|
@ -261,6 +261,7 @@ COMMANDS *airline-commands*
|
|||
|
||||
:AirlineExtensions *:AirlineExtensions*
|
||||
Shows the status of all available airline extensions.
|
||||
Extern means, the extensions does not come bundled with Airline.
|
||||
|
||||
==============================================================================
|
||||
AUTOCOMMANDS *airline-autocommands*
|
||||
|
|
|
@ -205,11 +205,13 @@ function! s:airline_extensions()
|
|||
call map(files, 'fnamemodify(v:val, ":t:r")')
|
||||
if !empty(files)
|
||||
echohl Title
|
||||
echo printf("%-15s\t%s", "Extension", "Status")
|
||||
echo printf("%-15s\t%s\t%s", "Extension", "Extern", "Status")
|
||||
echohl Normal
|
||||
endif
|
||||
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
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user