1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-09 09:50:06 +08:00

Update command for updating plugins

This commit is contained in:
wsdjeg 2017-04-05 21:27:08 +08:00
parent 64f45f42a7
commit 4695d33262
3 changed files with 13 additions and 4 deletions

View File

@ -27,7 +27,8 @@ function! SpaceVim#commands#load() abort
\ -complete=customlist,SpaceVim#commands#complete_SPConfig \ -complete=customlist,SpaceVim#commands#complete_SPConfig
\ SPConfig call SpaceVim#commands#config(<f-args>) \ 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 " :SPUpdate vim-airline
" < " <
@ -64,10 +65,14 @@ function! SpaceVim#commands#config(...) abort
endif endif
endfunction endfunction
function! SpaceVim#commands#update_plugin(plug) abort function! SpaceVim#commands#update_plugin(...) abort
if g:spacevim_plugin_manager ==# 'neobundle' if g:spacevim_plugin_manager ==# 'neobundle'
elseif g:spacevim_plugin_manager ==# 'dein' 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' elseif g:spacevim_plugin_manager ==# 'vim-plug'
endif endif
endfunction endfunction

View File

@ -156,6 +156,9 @@ function! s:on_pull_exit(id, data, event) abort
if empty(s:pulling_repos) if empty(s:pulling_repos)
" TODO add elapsed time info. " TODO add elapsed time info.
call s:set_buf_line(s:plugin_manager_buffer, 1, 'Updated. Elapsed time:') 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 endif
endfunction endfunction

View File

@ -338,7 +338,8 @@ COMMANDS *SpaceVim-commands*
< <
:SPUpdate *:SPUpdate* :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 :SPUpdate vim-airline
< <