作者  fcamel (飛啊!演化的小駱駝)  看板   P_fcamel
 標題  [vim]   不能使用vimdiff (on MS Win)
 時間  Sun Dec 25 01:02:28 2005


※ 引述《Edward.bbs@bbs.sayya.org (L.G.J.)》之銘言:
> ※ 引述《fcamel.bbs@bbs.wretch.cc (飛啊!演化的小駱駝)》之銘言:
> > 有沒有人遇過vimdiff時,
> > 會出現"E97 不能建立"的問題啊?
> > 但我把_vimrc砍掉時就可以了,
> > 即使_vimrc是空檔案也不行 @_@
> > 我是用 gVIM 6.3 on MS Win
> > 謝謝
>   :h E97
>                                                 *E97*
> Vim will do a test if the diff output looks alright.  If it doesn't, you will
> get an error message.  Possible causes:
> -  The "diff" program cannot be executed.
> -  The "diff" program doesn't produce normal "ed" style diffs (see above).
> -  The 'shell' and associated options are not set correctly.  Try if filtering
>    works with a command like ":!sort".
> -  You are using 'diffexpr' and it doesn't work.
> If it's not clear what the problem is set the 'verbose' option to see more
> messages.
原來可以查error msg, 多謝指點

原因出在無法執行diff (從沒想過這種可能性...Orz),
不知道為什麼沒有_vimrc時vimdiff會找到diff,
( c:\Program Files\Vim\vim63\diff.exe )
它應該是這麼做吧

     cmd /c "c:\Program Files\Vim\vim63\diff.exe -a --binary" FILE1 FILE2

但有_vimrc時它不用上面的做法, 而是直接cmd /c "diff ..."
於是我把diff.exe複製到system path裡其中一個目錄後, 問題就解決了

雖然很鳥, 姑且能用啦 ^^"