I have been fiddling with Vim lately while I was learning Ruby on Rails. The only thing I was learning was
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:
- Install Vundle as usual. Instruction is here
to your .gitignore.
- 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.
If you have your own
file, let’s gather them into
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.
Obtain your git repo link such as
. Add that repo in github.com to your remote. Use the link to your own repository below
Now you have everything linked up to your github, we are ready to install Vundle.
Setting Up Vundle
First, let’s install Vundle in your machine:
Then make sure these are in your
to use Vundle:
You of course can read more about Vundle here
Install and Manage Bundles
With Vundles installed, to install any git-managed plugins, find the corresponding git directory and the link to your
file such as:
So now, open Vim (or mVim) and install the bundles with:
All your bundles that you put in
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
folder, exclude it with .gitignore