-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way of adding a specific addon after vim is already started? #78
Comments
Probably possible, but super tricky. The first challenge is to add it to the runtime path. What position does it belong in? The OCD part of me wants to inject it into the exact spot it would have appeared if it had been loaded with Vim. But I guess we could get by with something more predictable. The harder part is actually loading plugins after they've been added. Do we |
Indeed. In general, you need plugin-specific code for that. For example, YouCompleteMe is bootstrapped through a function called on a Anyway, I have this code in my
|
Pathogen has a g:pathogen_blacklist variable that may be used to specify a list of plugins that should not be loaded at startup (btw, it also supports an undocumented $VIMBLACKLIST variable to temporarily disable plugins). Currently, I use that list to disable YouCompleteMe, which significantly increases the startup time, and which I need only when using some programming languages (e.g., Python). Enabling plugins at runtime is “super-tricky” in general: tpope/vim-pathogen#78 (YCM being a good example, since it requires to call a function to enable it), but I don’t need a completely general approach in my personal vimrc, so s:loadPlugin() should be good enough.
There are some plugins that I rarely use but when I need to use them I first have to edit my vimrc and remove them from the list of disabled plugins and start vim again.
Would it be possible to have a function either in pathogen, or based on pathogen that would allow the following:
:PathogenEnable pluginName
:PathogenEnable /path/to/other/plugin
in the first version the plugin would be in the bundle directory in the second case the plugin could be in a arbitrary directory.
Thank you for your work on this plugin.
The text was updated successfully, but these errors were encountered: