I want to install my vim plugins in ~/.dotfiles/vim

What is the proper way to install Pathogen in this case and keep it under version control?

What I've tried is to install it in ~/.dotfiles/vim/autoload/pathogen.vim and create a symbolic link to this in ~./vim/autoload

But this way i would have to create symbolic links to all of my plugins, and pathogen itself is not under version control.

How do i do this correctly?

  • You could simply copy the file to ~/.vim/autoload/pathogen.vim and have ~/.vim/autoload in your version control. Then you can manually update pathogen once in a while. Since this is not often updated I don't think it is really a problem not to always have the last version, you could only update it when you detect a bug and the bug is fixed by a new commit. Otherwise you'll probably have to install it as a git submodule (see doc here).
    – statox
    Oct 10 '16 at 9:00
  • @statox Ok I'm convinced that it's not worth the trouble to keep pathogen in a submodule. But I have all my other plugins in submodules. My setup so far is as follows: Pathogen installed inside ~/.dotfiles/vim/autoload/ A symbolic link for Pathogen is inside ~/.vim/autoload/ Plugins as submodules inside ~/.dotfiles/vim/bundle/ But the plugins are not recognized unless i manually create symbolic links for them like i did for pathogen.
    – kbhsas
    Oct 10 '16 at 9:05
  • Look at the first question of the pathogen FAQ: Tim Pope provides a way to keep pathogen as a submodule. Now I'm not sure why all of your plugins are in submodule: if you have pathogen it is possible not to put the plugin in the version control. This way on a fresh install you use pathogen to install them and you use pathogen once in a while to update them, it what plugin managers are for, right? (I'm assuming pathogen works more or less like Vundle or Vim-plug because I never used pathogen)
    – statox
    Oct 10 '16 at 9:10
  • @statox Pathogen doesn't update the plugins. That's why i keep each plugin in a submodule :)
    – kbhsas
    Oct 10 '16 at 9:12
  • Oh right. Well I'm not the best to answer your question then :) (The best I could do would be to advise you to use Vim-plug which is way easier to use IMO but that's not really what I would call an interesting answer)
    – statox
    Oct 10 '16 at 9:16

You can setup whole Vim directory inside ~/.dotfiles/vim and do a symlink

~/.vim -> ~/.dotfiles/vim

This way you will have all the plugins as submodules (including Pathogen) inside ~/.dotfiles/vim/bundle. To handle Pathogen, create a link

~/.dotfiles/vim/autoload/pathogen.vim -> ~/.dotfiles/vim/bundle/<path to pathogen.vim>

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.