2

I found out that a plugin I really like doesn't support the plugin manager I like, So the question is, can I use multiple plugin managers at the same time with vim?

If so, I think I can use another plugin manager just for that plugin. Please correct me if I am wrong. I fairly new to Vim.

  • There shoudn't be anything special to prevent a plugin manager from supporting a plugin. Please, indicate what makes you think otherwise. Also, please, specify your Vim (or Neovim) version and what is your current plugin manager. – Matt Jan 1 at 13:41
  • Exactly this issue: github.com/neoclide/coc.nvim/issues/1210 and also my lack of knowledge I guess, I appreciate if you could explain the independence of a plugin from the plugin managers. – Iresh Dissanayaka Jan 1 at 13:49
  • 1
    "We don't support it" in that context should be read as "Please, consult your plugin manager documentation for further instructions". "The independence" means that plugin managers are mostly used just to download and update stuff (at least, in Vim8), so you can do even without them at all. – Matt Jan 1 at 14:06
  • 1
    I now have an idea, thank you for the info. There's one more question, is it possible to use multiple plugin managers at once without conflict? – Iresh Dissanayaka Jan 2 at 4:51
  • 1
    @IreshDissanayaka It might be possible to use multiple plug-in managers, as long as they're managing plug-ins in separate directories and as long as they're only adding to 'runtimepath' and not overwriting it completely... So, yes, you might get away with running multiple managers... But I do encourage you to upgrade from Vundle to vim-plug, it should be pretty straightforward to do so. Good luck! – filbranden Jan 2 at 4:58
1

Plug-in managers are largely interoperable in Vim, all modern plug-in managers work by updating 'runtimepath' to include the root of the plug-in in the list of paths, which is how Pathogen works (you could call Pathogen the "grandfather" of plug-in managers.)

In your specific case, you are trying to install coc.nvim using Vundle.

As you reported in issue #1210, coc.nvim complains that the engine is missing:

$ vim src/java/GetSystemProperties.java 
[coc.nvim] javascript file not found, please compile the code or use release branch.

This is likely because you're missing the release branch, or the post-update hook from the installation instructions, for vim-plug users:

" Use release branch (Recommend)
Plug 'neoclide/coc.nvim', {'branch': 'release'}

" Or build from source code by use yarn: https://yarnpkg.com
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}

It turns out Vundle doesn't support either option.

You could emulate both with Vundle:

  • To use the "release" branch, you could go into the plug-in directory and manually git checkout the release branch.
  • To run the post-update hook, you could go into the plug-in directory and manually run the required yarn install --frozen-lockfile command.

However, it's quite possible that you'll have to manually fix those again whenever you update the plug-in, which might become quite of a hassle. You could freeze the plug-in version using {"pinned": 1} so Vundle doesn't update it, but that pretty much defeats much of the purpose of using a plug-in manager...

In your particular case, my recommendation is that you upgrade from Vundle to vim-plug.

I'm using the word "upgrade" here, rather than "migrate", since you could actually consider vim-plug to be a successor of Vundle. Vundle stopped being maintained many years ago and was superceded by other plug-in managers. There's really no reason to be using Vundle nowadays.

vim-plug uses the same model as Vundle (so if Pathogen is the "grandfather", Vundle is the "father".) Its configuration in your vimrc is about the same (main difference is using the Plug command rather than Plugin, and plug#begin/plug#end rather than vundle#begin/vundle#end) and supports a similar set of commands (again, with slightly different names, PlugUpdate rather than VundleUpdate or PluginUpdate.)

It's quite probable that you could migrate to vim-plug while keeping the same plug-in directory and not having to touch it or any of the plug-ins.

Just follow the other installation instructions for vim-plug (which amounts to downloading a single plug.vim file into your autoload directory) and remove the references to Vundle.vim, rename the commands in vimrc and you're essentially done.

If you do upgrade to vim-plug, you'll get full support for the coc.nvim setup, while not missing out on anything you've been getting from your current plug-in manager.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.