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
Enter the master repository's . git/modules directory, and find the directory corresponding to your submodule. Edit the config file, updating the worktree path so that it points to the new location of the submodule's working directory.
Git submodules may look powerful or cool upfront, but for all the reasons above it is a bad idea to share code using submodules, especially when the code changes frequently. It will be much worse when you have more and more developers working on the same repos.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With