Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

vimdiff a.c b.c

all lines were folded (as below)


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


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
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

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .