Friday, April 27, 2012

Re: Plugin manager with dependencies and selective bundle load



2012/4/27 lith <minilith@gmail.com>
Hi,

> I love how fast vim loads using tplugin and how it changes the runtime path on demand.
> But then I also found some limitations. Seems thare is no way to tell the tool not to load some plugins, also the dependency system looks a little but clunky because it is based on files rather than bundles.

I'm not sure what you mean by "not loading plugins". Since version 0.14, you can define "shallow" root directories. Plugins in such a directory can be loaded by means of the :TPlugin command but shouldn't be automatically loaded if you call one if its commands or functions etc.
Cool I have missed this feature from the docs.

Dependency handling can admittedly be improved. tplugin knows three ways of handling dependencies:

(1) Don't handle dependencies and load plugins as needed (this won't work if a plugin tests if another plugin was already loaded by checking the existence of a variable)

(2) Check if a plugins checks for the existence of loaded_PLUGIN_NAME (this requires that the plugin authors adhered to the formatting rules which they probably didn't :-)
How can I use this?
I understand TPluginDependencies only accepts file name patterns, no plugin names. at least is what the docs says.

(3) Use the info in *-addon-info.txt files if the plugin provides one.
Mmmm is this the same file used by vim-addon-manager?

If the above fails, you can define a file _tplugin_PLUGIN_NAME.vim to define dependencies like:
call TPluginDependencies('THIS_PLUGIN', ['OTHER_PLUGIN'])
Ok so TPluginDependencies( accepts plugins names isnt it?

I guess you could put this definitions also into vimrc.

HTH
Tom

--
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: