May 14, 2009

SVN plugin for Vim

For those of us too lazy to use an IDE or fancy graphical front-ends to SVN, here's a nice little plugin for vim to help you with commit messages:

http://www.vim.org/scripts/script.php?script_id=978

When you use 'svn commit' and it opens vim, it will show two windows: one with the normal SVN commit message, and the other with the output of 'svn diff', which is handy when you want to remember what you had changed.

A shortcut that is very handy to know for this is Ctrl+W+W (that is, hold Ctrl and hit w twice), which is to switch between vim windows.

To install it, just drop the script in ~/.vim/ftplugin, and make sure that your ~/.vimrc file has the following:
filetype plugin on

No comments: