Win10 gvim7.4 seemly not have enough permission(default install)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Win10 gvim7.4 seemly not have enough permission(default install)

Sand Glass
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 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Sand Glass
Is there anybody meet this?

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Dave Bucklin
On Tue, Jan 16, 2018 at 03:24:20AM -0800, Sand Glass wrote:

> Is there anybody meet this?
>
> --
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/d/optout.

Yes, I have this problem on business-owned laptops. You must have admin privileges to install gVim. You may be able to request admin privileges from an administrator.
An alternative, though not completely the same, is to install git-bash from git-scm.com. It includes many GNU command-line tools and also vim, but you will have to use it through the terminal. This means that it doesn't integrate with the Windows clipboard as cleanly as gVim (though you can interact with it through /dev/clipboard). You will also need to concern yourself with unix vs dos newlines, though it is trivial to convert back and forth using sed. This may provide you with a workaround until you can install gVim.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Tony Mechelynck
In reply to this post by Sand Glass
On Tue, Jan 16, 2018 at 8:05 AM, Sand Glass <[hidden email]> 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.

• Do you experience the same problem with the latest Vim 8.0? (If you
don't, it was fixed somewhere down the line.)
• Could it be an antivirus problem? (Permissions problems are often
due to an antivirus not recognizing a newly installed executable as
"legitimate".)
• Or else, it might be a Windows-specific conflict (of which I know
nothing, my last Windows system was XP SP2) between installing as
"administrator" and using as "normal user".

Best regards,
Tony.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Sand Glass
On Tuesday, January 16, 2018 at 10:52:33 PM UTC+8, Tony Mechelynck wrote:

> On Tue, Jan 16, 2018 at 8:05 AM, Sand Glass <[hidden email]> 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.
>
> • Do you experience the same problem with the latest Vim 8.0? (If you
> don't, it was fixed somewhere down the line.)
> • Could it be an antivirus problem? (Permissions problems are often
> due to an antivirus not recognizing a newly installed executable as
> "legitimate".)
> • Or else, it might be a Windows-specific conflict (of which I know
> nothing, my last Windows system was XP SP2) between installing as
> "administrator" and using as "normal user".
>
> Best regards,
> Tony.
So, where do the diff temp files save?

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Dominique Pellé
In reply to this post by Sand Glass
Sand Glass <[hidden email]> wrote:

> Is there anybody meet this?

I'm guessing that the reason you don't get more answers, is
because you're using a very old version of Vim.  If you're
using vim-7.4 (do you mean 7.4.0?), then you're missing
several years of bug fixes (probably several thousands
of bug fixes).  Please install vim-8.0 and check if it still
happens. You can find recent Vim builds for Windows here:

https://github.com/vim/vim-win32-installer/releases

Regards
Dominique

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Ben Fritz
In reply to this post by Sand Glass
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Sand Glass
Thanks, I use 7.4-1024 version is OK.
This is the 7.4-1024 version vimrc
####################
    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
      if $VIMRUNTIME =~ ' '
        if &sh =~ '\<cmd'
          if empty(&shellxquote)
            let l:shxq_sav = ''
            set shellxquote&
          endif
          let cmd = '"' . $VIMRUNTIME . '\diff"'
        else
          let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
        endif
      else
        let cmd = $VIMRUNTIME . '\diff'
      endif
      silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
      if exists('l:shxq_sav')
        let &shellxquote=l:shxq_sav
      endif
    endfunction

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Sand Glass
On Friday, January 19, 2018 at 12:09:10 PM UTC+8, Sand Glass wrote:

> Thanks, I use 7.4-1024 version is OK.
> This is the 7.4-1024 version vimrc
> ####################
>     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
>       if $VIMRUNTIME =~ ' '
>         if &sh =~ '\<cmd'
>           if empty(&shellxquote)
>             let l:shxq_sav = ''
>             set shellxquote&
>           endif
>           let cmd = '"' . $VIMRUNTIME . '\diff"'
>         else
>           let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
>         endif
>       else
>         let cmd = $VIMRUNTIME . '\diff'
>       endif
>       silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
>       if exists('l:shxq_sav')
>         let &shellxquote=l:shxq_sav
>       endif
>     endfunction
But vim74-1024 has an another bug. I often use window-split function. When I split a window, and ':e .' into the Netrw, stucked here.
So I go back to vim74.0, and just changed the vimrc diff-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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Sand Glass
On Saturday, April 7, 2018 at 1:46:22 PM UTC+8, Sand Glass wrote:

> On Friday, January 19, 2018 at 12:09:10 PM UTC+8, Sand Glass wrote:
> > Thanks, I use 7.4-1024 version is OK.
> > This is the 7.4-1024 version vimrc
> > ####################
> >     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
> >       if $VIMRUNTIME =~ ' '
> >         if &sh =~ '\<cmd'
> >           if empty(&shellxquote)
> >             let l:shxq_sav = ''
> >             set shellxquote&
> >           endif
> >           let cmd = '"' . $VIMRUNTIME . '\diff"'
> >         else
> >           let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
> >         endif
> >       else
> >         let cmd = $VIMRUNTIME . '\diff'
> >       endif
> >       silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3
> >       if exists('l:shxq_sav')
> >         let &shellxquote=l:shxq_sav
> >       endif
> >     endfunction
>
> But vim74-1024 has an another bug. I often use window-split function. When I split a window, and ':e .' into the Netrw, sometimes stucked here.
> So I go back to vim74.0, and just changed the vimrc diff-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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Win10 gvim7.4 seemly not have enough permission(default install)

Karthick Gururaj
In reply to this post by Sand Glass
On Tue, Jan 16, 2018 at 12:35 PM, Sand Glass <[hidden email]> wrote:
> [snip]
> 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.
Check :help E810 and :help tempfile

Also, try with verbose option set (see :help 'verbose')
:set verbose=5
:vert diffsplit _vimrc_my

If it is specific to Windows 10, it could be due to a feature called
"Controlled Folder Access" (google for it or see
https://support.microsoft.com/en-in/help/4046851/windows-10-controlled-folder-access-windows-defender-security-center
for an explanation).

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.