I am using Mobaxterm which has cygwin tools.
vim/gvim are working fine. I am using same vimrc file for both (with -u option). Note that I have same issue without any vimrc file.
To make vimdiff works, I had to define diffexpr this way:
function MyDiffWin() let opt = "" if &diffopt =~ "icase" let opt = opt . "-i " endif if &diffopt =~ "iwhite" let opt = opt . "-b " endif execute '! ls '. v:fname_in silent execute "!/bin/diff.exe -a --binary " . opt . v:fname_in . " " . v:fname_new . " > " . v:fname_out endfunction set diffexpr=MyDiff()
But when I try to use gvimdiff, with same vimrc, I have the same issue I had with vimdiff without diffexpr :
E810: Cannot read or write temp files E97: Cannot create diffs
I tried to display the files used by diff.exe with the command
execute '! ls '. v:fname_in
But it does not display anything :
:! ls /home/mobaxterm/tmp/vD9PXDX/0 Command terminated
So not surprising he cannot diff files ! But I do not understand the problem.
vim and gvim are in version 8.0.494