# Sync Vim With Github And Vundle

I have been fiddling with Vim lately while I was learning Ruby on Rails. The only thing I was learning was

 1  hjkl
movement keys after using mVim for about a few months, on and off.

So I decided to do something fancy, to sync them across my mac. Totally have nothing to do with improving vim foo, but it’s fun. I got started from this blog post from VimCasts using Pathogen.

But being in love with Vundle after using spf13, I insist on using Vundle. Turns out, it’s much easier with Vundle since no need to install git submodule or update them. Vundle takes care all of them for you.

Note: if you are farmilar with everything, have your .vim on github and just want to switch to Vundle, there are two steps:

1. Install Vundle as usual. Instruction is here
2. Put 1 ~/.vim/bundle to your .gitignore.
3. See my example, sloppy github repo

Here is the long step by step version.

## Setting up ~.vim

I’m going to be short and brief here. Read the original post if you are confused on the steps.

 1  ~/.vim
directory and 1 .vimrc file, let’s gather them into 1 ~/.vim directory and then symlink your .vimrc and .gvimrc files:

## Setting Up Git

Turns your .vim directory to a git directory, make an empty README, commit.

Now that you have a local git, makes a repository on github. If you are unsure how to do that, visit this help page

 1  git@github.com:username/repository-name.git

## Setting Up Vundle

First, let’s install Vundle in your machine:

Then make sure these are in your

 1  .vimrc
to use Vundle:

## Install and Manage Bundles

With Vundles installed, to install any git-managed plugins, find the corresponding git directory and the link to your

 1  .vimrc
file such as:

So now, open Vim (or mVim) and install the bundles with:

1
:BundleInstall


All your bundles that you put in

 1  .vimrc
should install now.

## Let Vundle Manage Bundles

The only thing we are going to sync is your .vimrc. We will not sync Vundle bundles or even Vundles itself. We’ll let Vundles manage all of that. So, don’t let git manage your

 1  ~/.vim/bundle
folder, exclude it with .gitignore