Subversion & vimdiff

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1465
Joined: Fri Aug 29, 2003 8:39 pm

Subversion & vimdiff

Post by ^rooker »

I like to use vimdiff when working on code in commandline environments.
Here's a short mini-howto for setting "vimdiff" as default "svn diff" replacement.

These steps should work on most/all Debian-based GNU/Linux distros (e.g. Ubuntu).

1) Write a small wrapper script:

Code: Select all

#!/bin/bash
DIFF="vimdiff"
$DIFF ${6} ${7}
Save this as "/usr/bin/svndiff".

2) Edit your subversion config:
In "~/.subversion/config"
Override the default diff command by adding this line in the "[helpers]" section:

Code: Select all

diff-cmd = svndiff
That's it!
Now, "svn diff" calls vimdiff :)
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply