Closed jdhao closed 3 years ago
UpdateRemotePlugins
is done automatically by vim-packager, so it should be sufficient to run only install script. Try this:
call packager#add('sakhnik/nvim-gdb', { 'do': './install.sh' })
Thanks for the info. It works. It would be great to add that to README or the doc so that users do not need to run the 'UpdateRemotePlugins' command anymore.
Another question. For post-install hooks that need to run a function, for example [markdown-preview](), the following works:
call packager#add('iamcco/markdown-preview.nvim' , { 'do': { -> mkdp#util#install() } })
while the following command fails:
call packager#add('iamcco/markdown-preview.nvim' , { 'do': 'function(mkdp#util#install())' })
it complains that function mkdp#util#install()
does not work. However I can manually run the function.
If do
is a string, and it doesn't start with :
, it is interpreted as external command.
So you could also do it like this:
call packager#add('iamcco/markdown-preview.nvim' , { 'do': ':call mkdp#util#install()' })
I agree that we could use more info in readme. I'm open for PRs.
Thanks for the clarification, call packager#add('iamcco/markdown-preview.nvim' , { 'do': ':call mkdp#util#install()' })
also works.
I added some examples in this section of readme: https://github.com/kristijanhusak/vim-packager#packageraddname-options. Hope it will be helpful enough.
I have a few questions regarding the value for
do
inpackager#add()
function.install.sh
script and:UpdateRemotePlugins
command after install. Is it possible to combine the two in post update? I can't seem to get it right. For vim-plug, the following would work:call packager#add('Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'})
works, whilecall packager#add('Shougo/deoplete.nvim', {'do': 'UpdateRemotePlugins'})
(note that there is no colon before theUpdateRemotePlugins
) does not. Is the colon a must?Thanks for this wonderful plugin. It seems to be even faster than vim-plug. Very promising!