Subversion & vimdiff
Posted: 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:
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:
That's it!
Now, "svn diff" calls vimdiff
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}
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
Now, "svn diff" calls vimdiff