Page 1 of 1

Subversion & vimdiff

Posted: Wed May 03, 2017 9:51 pm
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 :)