4

Hi I am relatively new to vim. I am fairly familiar with setting up my vimrc, installing colorschemes, and I have included a python file type plugin in my ~/.vim/ftplugin. My question is as follows:

  1. Do I really need a plugin manager like vundle?
  2. What is the utility of such tools, how would it affect my vim ecosystem

I am concerned that installing and using a plugin manager will negatievely impact my understanding of vim and somehow reduce the amount of control I have over my work environment.

9

Do I really need a plugin manager like vundle?

No. Plugin managers have always been and will always be optional.

What is the utility of such tools, how would it affect my vim ecosystem?

You don't have a "vim ecosystem"; you have a Vim setup.

A plugin manager may be useful if:

  • you use too many plugins,
  • you like to try new plugins,
  • you absolutely want your plugins to be always up-to-date.

If you use too many plugins, the usual installation scheme will likely become too messy very quickly. This will make the process of updating/removing plugins quite a chore. Plugin managers usually keep track of what is installed and where, in order to make the whole thing easier for the user.

If you like to try new plugins, plugin managers usually make it easier to install/remove individual plugins.

If you absolutely want your plugins to be always up-to-date, plugin managers usually give you commands for updating or even auto-updating individual plugins. This more or less guarantees an always up-to-date setup.

If none of the use cases above fits yours then you don't need a plugin manager. But having one won't really hurt anything unless you fail to read and understand its documentation.

Since I don't use many plugins, don't like to try new plugins, and my few plugins are either written by me of very stable/dead, I have zero need for a plugin manager. But I like when my stuff is neat and tidy so I use a runtimepath manager, Pathogen, that lets me keep my plugins in separate directories.

| improve this answer | |
3

A plugin management helper like pathogen has the distinct advantage of keeping each of the plugins separate, on its own subdiroctery. In fact, you can also use it to keep parts of your own configuration in separate subdirectories. That way it is easy to act on a single plugin or a single part of your configuration (remove, update, etc...) without touching the others.

What pathogen does amounts to "blending" all those subdirectories "on-the-fly" as you run vim, so each follows the regular .vim structure (with possible plugin/, ftplugin/, autoload, etc... subdirectories), while helping make sense of what comes from where.

Edit: pathogen will not "auto-update" your plugins. However, having each on a separate subdirectory makes it easier to update them if/whenever needed, especially for those that are clones of a git repository and can simply be maintained as such.

Edit2: replaced plugin manager by plugin management helper, based on discussion in the comments below (to clarify that pathogen fits a niche somewhere between simply placing contents of plugins in a single instance of the .vim directory and using an actual full-featured "plugin manager").

| improve this answer | |
  • Pathogen is not a plugin manager. – romainl Oct 10 '16 at 20:52
  • @romainl: that's really a matter of definition: if you require a plugin manager to auto-update your plugins, then pathogen doesn't meet that requirement; if you rquire a plugin manager to help you manage other plugins, then it does; and according to the plugin repository in vim's official site, pathogen is a poor man's package manager. – Dalker Oct 12 '16 at 4:25
  • Pathogen doesn't offer any plugin management feature. That's why it is not a plugin manager. All it does is manage your runtimepath transparently which gives the user the opportunity to put his plugins in a single directory. All the actual management is left to the user. – romainl Oct 12 '16 at 5:23
  • @romainl: Fair enough. I'll edit the answer to replace plugin manager by plugin management helper, which might better convey the idea that you still have to manage the plugins "by hand", while keeping the notion that pathogen definitely helps you a lot in the process, and is thus definitely an interesting alternative for somebody who is wondering whether to use a plugin manager or not (which was the original question) – Dalker Oct 12 '16 at 9:18
  • Note, with vim8 you don't need pathogen anymore. – Christian Brabandt Oct 12 '16 at 17:14
2

I would like to recommend one like vundle for the following reasons:

  1. you'll have a lot plugins sooner than you think, once you get used to vim, it will make sense to do nearly 'everything' in it.
  2. it's not easy to manage all plugins and those configs.
  3. having a plugin to manage plugins makes it easier to migrate, say, deploy a new environment.
| improve this answer | |
1

Plugin managers answer two needs:

  1. Isolate plugins in order to ease updating, removal or inhibition.

    A long time ago we had vimball that were easy to install with a :so pluginname.vba. Alas, everything was installed under $HOME/.vim. It quickly became impossible to know which file belonged to which plugin. Worse if two plugins were using a same filename, conflicts could occur.

    Came plugin managers. They helped isolate the plugins in different directories. The magic was already present in Vim, they just exploited it. This is the runtimepath management feature.

    Came Vim 8 packages. We now no longer need plugin managers to isolate our plugins into different directories.

  2. Simplify the installation of plugins.

    Plugins can be installed manually from the repositories where they are hosted. Usually it's as simple as cd ~/.vim/pack/dist/opt && git clone repoaddress. We have to fill in the exact address. If we want to update the plugin, we have to go into the directory, and do a git pull and so on.

    Plugin managers have features that helps us on this topic. Moreover, they may or may not have the following features:

    • support any git server -- most are github centric, but still accept repositories on gitlab...
    • support other protocols (mercurial, svn...)
    • install from vimball, tarball, or directly from vim.org
    • have shortcuts for names (e.g surround would be installed from its official repository)
    • permit to update everything
    • install or update in parallel
    • do some extra work like trying to compile a source code (for YCM for instance)
    • follow expressed dependencies
    • rely internally on package feature.
    • update documentation tags
    • ...

TL;DR: We don't need plugin manager anymore to install plugins in different directories. Yet, they are damn useful to help us in the installation process.

Note: There is a question here about What is the difference between the vim plugin managers?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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