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

Fixed to work with vim-plug

Docs claim to support vim-plug, but I could not get it to work
by default. I fixed zvim#plug#add() and s:install_manager to
at least work minimally.

Still unfixed is that using vim-plug does not seem to respect
lazy-loading rules.
This commit is contained in:
Camden Cheek 2017-01-18 18:42:01 -05:00
parent eadaf62aa6
commit 8229728e8f

View File

@ -59,7 +59,7 @@ function! s:install_manager()
elseif g:spacevim_plugin_manager == 'vim-plug'
"auto install vim-plug
if filereadable(expand('~/.cache/vim-plug/autoload/plug.vim'))
let g:spacevim_dein_installed = 1
let g:spacevim_vim_plug_installed = 1
else
if executable('curl')
exec '!curl -fLo '
@ -67,7 +67,7 @@ function! s:install_manager()
\ . ' --create-dirs '
\ . 'https://raw.githubusercontent.com/'
\ . 'junegunn/vim-plug/master/plug.vim'
let g:spacevim_dein_installed = 1
let g:spacevim_vim_plug_installed = 1
else
echohl WarningMsg
echom "You need install curl!"
@ -158,6 +158,12 @@ function! zvim#plug#add(repo,...) abort
else
call dein#add(a:repo)
endif
elseif g:spacevim_plugin_manager == 'vim-plug'
if len(a:000) > 0
exec "Plug '".a:repo."', ".join(a:000,',')
else
exec "Plug '".a:repo."'"
endif
endif
exec 'call add(g:unite_source_menu_menus'
\ . '.AddedPlugins.command_candidates, ["['