How to use pathogen and Vundle at the same time with vim?
Asked Answered
V

1

5

I'm a vim newbie setting up some plugins. Some recommend installation via Vundle, others via pathogen. Is it possible to use both package managers at the same time in this circumstance? If so, is it just a matter of installing both and installing the relevant plugins according to their normal instructions, and nothing will conflict? Or do I have to do something special to make this work?

Vaticination answered 30/4, 2015 at 15:12 Comment(0)
P
9

TL;DR: You don't need both; Vundle includes the Pathogen functionality (and more)

The Pathogen plugin just automatically extends your 'runtimepath' (locations where Vim searches for plugins) to include all subdirectories in ~/.vim/bundle/. This is simple, but allows to separate each plugin into a dedicated tree, making updates (e.g. via Git) and removals simpler.

Other plugins have built upon that idea and extended it with automatic download, installation, and updating, usually via some Plug foo/bar commands in your ~/.vimrc. As they need the same separation as provided by Pathogen, such implementation usually is included in them. (The core is just a one-liner, not much of a deal.)


You don't actually need any package manager; I personally use 100+ plugins without one. It's a matter of how often you use new machines with Vim (the central configuration and installation capabilities certainly make bootstrapping easier), and how often you update / try out new plugins. If you just use one or two systems, and are conservative in the number and update frequency of plugins, putting everything into ~/.vim/ might also work for you. (This is just to avoid that you're intimidated by those package managers; try them out, and use one if you like it.)

Porcupine answered 30/4, 2015 at 15:22 Comment(6)
Thanks. So for installing e.g. this pathogen-recommending plugin on OS X, if I already have Vundle installed I just follow the command-line install instructions? I did try adding Bundle 'OmniSharp/omnisharp-vim.git' to .vimrc causing Vundle to give me an error.Vaticination
I think that needs to be Plugin 'OmniSharp/omnisharp-vim'.Porcupine
Also, that plugin is a huge monster attempting to turn your Vim into a C# IDE. Not exactly a gentle introduction for a Vim beginner; you're jumping in at the deep end!Porcupine
Right, I'm thought I had it right and did try it sans .git also but it just worked right now, so I must have had something wrong. Anyhow, so now that I've installed via Vundle, that's it, or do I need to do the xbuild to build it per the instructions?Vaticination
Yeah, I know what you mean. The thing is, I'm totally sold on vim's modal approach to editing, just that I do find Intellisense-style semantically aware completions, go to definition, and find usages really helpful. So trying to get best of both.Vaticination
Btw, FWIW, I figured out the problem I was having with Plugin 'OmniSharp/omnisharp-vim' via Vundle. I added that line, then saved and reloaded .vimrc (via :so %) then ran :PluginInstall. Error on that plugin. Quitting vim and restarting and then installing works. This seems to be the case for any plugin, or at least another one that I just installed.Vaticination

© 2022 - 2024 — McMap. All rights reserved.