Thursday, April 26, 2012

Re: Plugin manager with dependencies and selective bundle load

2012/4/25 Marc Weber <marco-oweber@gmx.de>
> But I think is not possible to load the plugins on demand, like in tplugin,
Why do you think so? If the author tells you it is possible if the
plugin supports it then you should give a reason.
Those who don't are those plugins who are using Start auto commands.
And there is not much you can do about it but a *lot* of patching.
I am not talking about putting all the stuff in autoload. Which a task for he plugin developer.
tplugin scans all the bundles and then use the VimEnter event to load them on the fly. (I think, is what I understand from the docs)
So the initial runtime path is very short, but as soon as you call to a function in the autoload of a plugin it is added to the runtime path and loaded.
I dont know exactly how it works but this is what it is doing ans is great.
AFAIK in vam you have to activate the plugins manually using ActivateAddons, then the plugin rather than being waiting to be called it is loaded.
This is what I mean about loading on demand.
I am probably missing something and vam can do the same thing.
It is similar to the experimental mechanism to load plugins based on filetypes I have seen in the vam docs, but for functions in autoload and if it is possible for commands.
As soon as you use an autoload function or a command defined by a plugin it is loaded in the runtime path.

> Another doubt I have is, if I have a plugin/bundle, which hasnt been
> installed by VAM, it is possible to activate it?
   " Addons are put into vam_install_path/plugin-name directory
   " unless those directories exist. Then they are activated.
Yep sorry my bad I got this working.

This sentence in the SetupVAM function was written to reply to exactly
that question. If you have any idea how to improve the wording let me
know.

echo "echoe 'abc'" >> ~/.vim/vim-addons/abc/plugin/any-name.vim

Then start vim and do :ActivateAddon abc
You'll get the error message.

So I'm pretty sure that you've missed a small detail :)
Just recheck and retry

> Finally vim crashes almost after any add on install.
Update to latest Vim version. Sorry about that.
No problem I think we have vim 7.3 installed also, but is not the default version here.
Ill try 7.3 and see if it solves the instability.
I want fix some segfaults my self. in the end its not VAM's fault - Vim
should not crash if using VimL only.

Just write again if you have additional / still the same problems.
I have been trying dependencies.
So I created the addon-info.json file inside my plugin root.
It works fine but seems dependencies works for installing plugins, not for loading.
So if I have:
plugin1
plugin2

And plugin1 depends on plugin2, if I install plugin1 vam ask me to install plugin2, which is great.
What I am looking for is also the same thing but for activate plugins, so if I do:
ActivateAddon plugin1
plugin2 is automatically activated, I dont want to do:
ActivateAddon plugin2
ActivateAddon plugin1

Is there any way to achieve this in vam?

Thanks!

Yours
Marc Weber

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php



--
Un saludo
Best Regards
Pablo Giménez

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: