Friday, May 11, 2012

Re: Plugin manager with dependencies and selective bundle load

2012/5/10 Marc Weber <marco-oweber@gmx.de>
Well - you can add call vam#ActivateAddon([...]) to any logic you like -
however then the plugins are likely to depend on VAM which may not what
you want. Of course you can do so conditionally if the function exist.

Something roughly like this:

augroup AU_NAME
 autocmd BufRead,BufNewFile *.py call ActivateAddon([foo])
 autocmd BufRead,BufNewFile *.php call ActivateAddon([foo, bar])
augroup end

now bar only get's loaded if you edit php files.

Think about how many ms you're going to safe by spending such
huge amounts of time ..
Thanks Marc.
In this case is not a matter of saving time.
I want to create a dependancy, setting it in the addon-info file, so when I install the plugin the dependancy will be installed as well.
But for activating the plugin I want to do it basd on a file type.
Now when you have a dependancy, it affects installation and also activation of the plugin.
Someyhing like conditional dependancy would be great, so for instance if tis condition isa file type, the plugin will be downloaded but not activated, it only will be activatedif the file type is true for the condition.

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: