对于终端的 vim
~/.subversion/config
将下面的代码保存为 svndiff:
拷贝到
/usr/local/bin/svndiff
并设置权限:sudo chmod +a /usr/local/bin/svndiff
1
对于 MacVim
修改 /usr/local/bin/svndiff
内容如下:
#!/bin/bash LEFT=${6} RIGHT=${7} TMPLEFT="/tmp/${LEFT##*/}.$$" TMPRIGHT="/tmp/${RIGHT##*/}.$$" cp "$LEFT" "$TMPLEFT" cp "$RIGHT" "$TMPRIGHT" mvim --servername SVNDIFF --remote-tab-silent +"vertical diffsplit $TMPLEFT|wincmd w" "$TMPRIGHT" sleep 0.1 SN=`mvim --serverlist | grep "SVNDIFF"` until [ "$SN" == "SVNDIFF" ]; do sleep 0.1 SN=`mvim --serverlist | grep "SVNDIFF"` done rm -f "$TMPLEFT" "$TMPRIGHT"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
之前尝试过修改终端方案中的
DIFF="/usr/bin/vimdiff"
1
为:
DIFF="gvim -d"
1
未遂,右侧的代码会为空。