Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I was comparing two files with vimdiff in my cygwin,

vimdiff a.c b.c

all lines were folded (as below)

all-folded

Then I used zR to open all folders, but no difference was showed.

no-difference

Another weird thing here is, when I start to add a new line (by BUTTON o), it start to show difference: new-difference

I found that my vimdiff is actually linking to gvim, no sure if this is the problem?

$ type diff
diff is /cygdrive/c/Program Files (x86)/Vim/vim72/diff

$ type vimdiff
vimdiff is /usr/bin/vimdiff

$ ll /usr/bin/vimdiff
lrwxrwxrwx 1 dhuang7 Domain Users 25 Jul 27 16:35 /usr/bin/vimdiff -> /etc/alternatives/vimdiff

$ ll /etc/alternatives/vimdiff
lrwxrwxrwx 1 dhuang7 Domain Users 17 Jul 27 16:35 /etc/alternatives/vimdiff -> /usr/bin/gvim.exe

$ ll /usr/bin/gvim.exe
-rwxr-xr-x 1 dhuang7 Domain Users 1801245 Jun 28 12:39 /usr/bin/gvim.exe

Btw there is no .vimrc when this was running. And I had tried to add set diffopt=filler,context:50 in to my .vimrc but still the same.

Tried :messages after vimdiff starting but no error was seen:

"a.c" 7L, 74C
"b.c" 6L, 59C
share|improve this question
    
There's a bug somewhere. Diffing those two files works as expected here. –  romainl Jul 30 '12 at 7:11
1  
Do any errors show up when you type ":messages" after starting vimdiff? My guess is that you are missing a diff binary, or it isn't in your $PATH. –  Heptite Jul 30 '12 at 17:31
    
@Heptite No error was seen with :messages, I had updated my question with the output. –  Deqing Jul 31 '12 at 1:36
    
What does "type diff" output? –  Heptite Jul 31 '12 at 3:56
    
@Heptite "type diff" shows /cygdrive/c/Program Files (x86)/Vim/vim72/diff. Had updated my question again, thanks for asking. –  Deqing Aug 1 '12 at 1:40

2 Answers 2

I just had the same problem and running :diffupdate returned E97: Cannot create diffs

Solution: my /tmp partition was full. The diff command run internally by vim was not able to store the result. Just cleaned this up and everything was working again.

share|improve this answer

I've been having the exact same issue. I noticed the following error after executing :diffupdate

/bin/bash: /usr/share/vim/vim73diff: No such file or directory

That file obviously does not exist so I suspect that @Heptite was correct in saying that vi cannot find a diff binary. diff.exe was already in my PATH though so I'm confused by this. However, symlinking it seems to fix the problem.

ln -s /usr/bin/diff /usr/share/vim/vim73diff

Ugly, but I'm back working again.

share|improve this answer
    
:diffupdate returns E97: Cannot create diffs in my vimdiff. Not sure why and how to fix it. –  Deqing Aug 9 '12 at 10:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.