First create a script svbdiff inside the ~/.vim/scripts/ directory that contains the following
#!/bin/bash
shift 5;/usr/bin/vimdiff -f "$@"
and make it executable:
chmod +x ~/.vim/scripts/svndiff
Then create an alias in your ~/.bashrc file like:
alias svndiff="svn diff --diff-cmd ~/.vim/scripts/svndiff"
Now you can go to any Subversion repository and display file differences with
svndiff h264.c
The screenshot above shows the diff output of the h264.c of libavcodec. Make sure you have a color scheme that highlights the file differences. The screenshot above uses the inkpot color scheme.
FYI, after you create your svndiff script, instead of creating an alias in your .bashrc you can make sure ~/.vim/scripts/ is in your $PATH and add an entry to your ~/.subversion/config file like so:
ReplyDelete[helpers]
diff-cmd = svndiff
See the subversion manual for more info.
Thanks for the tip... I like this solution better!
ReplyDelete