A Weblog of Artem Dudarev

Keep Vim Settings and Plugins in Git Repo

VIM. Photo by Thomas Hawk.

To have my vim settings easily available I followed instruction in one of the vimcast posts and set up a dotvim repository on Github.

Now, to set up vim on new machine or for another user I can do

cd ~
git clone http://github.com/dudarev/dotvim.git ~/.vim
ln -s ~/.vim/vimrc ~/.vimrc
ln -s ~/.vim/gvimrc ~/.gvimrc
cd ~/.vim
git submodule init
git submodule update

Plugins are included as git submodules with Pathogen. At the moment I include the following three that I constantly use

I am trying new ones regularly, so more submodules will be added. To add a new submodule one should just do

git submodule add http://github.com/tpope/vim-fugitive.git bundle/fugitive
git add .
git commit -m "Install Fugitive.vim bundle as a submodule."

To upgrade all plugins

git submodule foreach git pull origin master

More vim-related, though less systematic, links may be found in my wiki.