Subversion & vimdiff

Step-by-Step descriptions of how to do things.

Subversion & vimdiff

Postby ^rooker » Wed May 03, 2017 9:51 pm

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
$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 :)
  • 0

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!
User avatar
Site Admin
Posts: 1446
Joined: Fri Aug 29, 2003 8:39 pm
Reputation: 0

Return to HowTo's

Who is online

Users browsing this forum: No registered users and 3 guests

Who is online over last 24 hours

Users browsed this forum in the last 24 hours: Google [Bot] and 10 guests

Reputation System ©'