mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 01:10:05 +08:00
Update command for updating plugins
This commit is contained in:
parent
64f45f42a7
commit
4695d33262
@ -27,7 +27,8 @@ function! SpaceVim#commands#load() abort
|
||||
\ -complete=customlist,SpaceVim#commands#complete_SPConfig
|
||||
\ SPConfig call SpaceVim#commands#config(<f-args>)
|
||||
""
|
||||
" Command for update plugin, support completion of plugin name.
|
||||
" Command for update plugin, support completion of plugin name. If run
|
||||
" without argv, All the plugin will be updated.
|
||||
" >
|
||||
" :SPUpdate vim-airline
|
||||
" <
|
||||
@ -64,10 +65,14 @@ function! SpaceVim#commands#config(...) abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#commands#update_plugin(plug) abort
|
||||
function! SpaceVim#commands#update_plugin(...) abort
|
||||
if g:spacevim_plugin_manager ==# 'neobundle'
|
||||
elseif g:spacevim_plugin_manager ==# 'dein'
|
||||
call dein#update([a:plug])
|
||||
if a:0 == 0
|
||||
call SpaceVim#plugins#manager#update()
|
||||
else
|
||||
call dein#update(a:000)
|
||||
endif
|
||||
elseif g:spacevim_plugin_manager ==# 'vim-plug'
|
||||
endif
|
||||
endfunction
|
||||
|
@ -156,6 +156,9 @@ function! s:on_pull_exit(id, data, event) abort
|
||||
if empty(s:pulling_repos)
|
||||
" TODO add elapsed time info.
|
||||
call s:set_buf_line(s:plugin_manager_buffer, 1, 'Updated. Elapsed time:')
|
||||
if g:spacevim_plugin_manager ==# 'dein'
|
||||
call dein#recache_runtimepath()
|
||||
endif
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
@ -338,7 +338,8 @@ COMMANDS *SpaceVim-commands*
|
||||
<
|
||||
|
||||
:SPUpdate *:SPUpdate*
|
||||
Command for update plugin, support completion of plugin name.
|
||||
Command for update plugin, support completion of plugin name. If run without
|
||||
argv, All the plugin will be updated.
|
||||
>
|
||||
:SPUpdate vim-airline
|
||||
<
|
||||
|
Loading…
Reference in New Issue
Block a user