Skip to content

Instantly share code, notes, and snippets.

@cloud8421
Created September 18, 2012 10:34
Show Gist options
  • Save cloud8421/3742505 to your computer and use it in GitHub Desktop.
Save cloud8421/3742505 to your computer and use it in GitHub Desktop.
Vim and Tmux workshop - 03 - How to use Pathogen

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment