mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-19 02:25:35 -07:00
Add a number of public utility functions
Some trivial functions to access `s:loaded`, to allow sane introspection of plugin status, etc.
This commit is contained in:
parent
ddce935b16
commit
514e3ebe01
12
plug.vim
12
plug.vim
@ -2808,5 +2808,17 @@ if exists('g:plugs')
|
||||
call s:define_commands()
|
||||
endif
|
||||
|
||||
function! plug#plugin_info(name) abort
|
||||
return get(s:loaded, a:name, {})
|
||||
endfunction
|
||||
|
||||
function! plug#loaded() abort
|
||||
return keys(filter(copy(s:loaded), { k, v -> v }))
|
||||
endfunction
|
||||
|
||||
function! plug#not_loaded() abort
|
||||
return keys(filter(copy(s:loaded), { k, v -> !v }))
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
Loading…
Reference in New Issue
Block a user