On Tuesday, January 16, 2018 at 1:05:29 AM UTC-6, Sand Glass wrote:
> I install gvim7.4 in the default directory 'C:\Program Files (x86)\Vim' on
> windows10 x64 system. 
> I open the origin _vimrc file, and run 
> :vert diffsplit _vimrc_my 
> It shows error:
> E810: Cannot read or write temp files
> E97: 无法创建diff
> I open the origin _vimrc file again and delete everything, and run
> :vert diffsplit _vimrc_my 
> OK.
> 
> Question is: 
> Where the temp files save when do diff using the origin _vimrc config?
> Why this will hapen on win10? my win7 system is OK.
> 
> ========== the origin _vimrc file contents
> "set nocompatible
> "source $VIMRUNTIME/vimrc_example.vim
> "source $VIMRUNTIME/mswin.vim
> "behave mswin
> "
> "set diffexpr=MyDiff()
> "function MyDiff()
> "  let opt = '-a --binary '
> "  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
> "  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
> "  let arg1 = v:fname_in
> "  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
> "  let arg2 = v:fname_new
> "  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
> "  let arg3 = v:fname_out
> "  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
> "  let eq = ''
> "  if $VIMRUNTIME =~ ' '
> "    if &sh =~ '\<cmd'
> "      let cmd = '""' . $VIMRUNTIME . '\diff"'
> "      let eq = '"'
> "    else
> "      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
> "    endif
> "  else
> "    let cmd = $VIMRUNTIME . '\diff'
> "  endif
> "  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . 
> eq
> "endfunction
> ========== the origin _vimrc file contents

You have an outdated MyDiff function which old installer versions created for 
you. Version 7.4.103 fixes the installed MyDiff function to account for changes 
in the way Vim handles quoting of arguments in external shell commands on 
Windows. Install Vim 8.0 as others have suggested or Google for the correct 
MyDiff function (currently in the top few search results for that error message 
text are StackOverflow and Superuser questions which would have told you this 
and provide the corrected function).

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to