From 8229728e8fc19b663e03f190ef4d1d59b428b78d Mon Sep 17 00:00:00 2001 From: Camden Cheek Date: Wed, 18 Jan 2017 18:42:01 -0500 Subject: [PATCH] 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. --- autoload/zvim/plug.vim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autoload/zvim/plug.vim b/autoload/zvim/plug.vim index c4f8b717e..b061be3dc 100644 --- a/autoload/zvim/plug.vim +++ b/autoload/zvim/plug.vim @@ -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, ["['