First step is creating a dotfiles directory:
cd ~/dev/
mkdir dotfiles
Then we move and symlink our .vimrc
file":
mv ~/.vimrc dotfiles/vimrc
ln -s ~/dev/dotfiles/vimrc ~/.vimrc
We then need a vim
folder
mkdir vim
ln -s ~/dev/dotfiles/vim ~/.vim
Now we can add Pathogen:
mkdir vim/bundle
git submodule add https://github.com/tpope/vim-pathogen vim/bundle/vim-pathogen
And update our .vimrc by sticking this at the top:
" loading pathogen at runtime as it's bundled
runtime bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
This uses Pathogen as a submodule itself, so it can be updated.
Now everytime you want to add a plugin, just add it as a submodule and it's done.
To update them all, you can run this from the dotfiles repo root:
git submodule foreach git pull origin master