9

I want to keep my Vim plugins up-to-date with git by using github repos as submodules with the help of pathogen. Everything is well except pathogen itself.

For example, I have a repository in ~/.vim, at pathogen's repo has autoload directory in its root: <pathogen repo>/autoload.

Is it possible to make a git submodule so that pathogen's autoload goes into ~/.vim?

~/.vim/autoload/pathogen.vim
Alex B
  • 82,554
  • 44
  • 203
  • 280

2 Answers2

20

Clone the submodule into a subdirectory and symlink it's contents.

For pathogen, I also explicitly blacklisted itself (in the bundle directory) to prevent it from self-sourcing.

tlvince
  • 516
  • 3
  • 10
  • This is what I ended up doing, except pathogen is outside `bundle` directory. This doesn't work on Windows (which I don't use, anyway), so I was waiting for a somewhat portable answer to appear. – Alex B Apr 03 '11 at 23:13
  • 1
    I believe you can create a symbolic link in Windows: http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/ – mattalxndr Apr 12 '11 at 23:00
10

You can't have a submodule at the root of your repository because both .git folder would conflicts.

You must create your submodule in a subfolder.

Artusamak
  • 2,470
  • 19
  • 19