Loading ...
Sorry, an error occurred while loading the content.
 

Vimdiff, version 7.4 on Windows 7

Expand Messages
  • Marcio Gil
    I installed vim 7.4 today. Now the Diff with vim option don t work. E810: Cannot read or write temp files E97: Cannot create diffs -- -- You received this
    Message 1 of 22 , Aug 12, 2013
      I installed vim 7.4 today. Now the "Diff with vim" option don't work.
      E810: Cannot read or write temp files
      E97: Cannot create diffs

      --
      --
      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+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Tony Mechelynck
      ... If diffexpr is empty, you need an executable diff program that Vim can find (in the $PATH, normally), and which can produce ed-style diffs. If
      Message 2 of 22 , Aug 12, 2013
        On 12/08/13 14:59, Marcio Gil wrote:
        > I installed vim 7.4 today. Now the "Diff with vim" option don't work.
        > E810: Cannot read or write temp files
        > E97: Cannot create diffs
        >

        If 'diffexpr' is empty, you need an executable "diff" program that Vim
        can find (in the $PATH, normally), and which can produce ed-style diffs.

        If 'diffexpr' is set, evaluating it must produce a file in the required
        format.

        See:
        :help vimdiff
        :help 'diffexpr'
        :help diff-diffexpr


        Best regards,
        Tony.
        --
        A wood-fetish busboy named Gable
        Is rapid, is thorough, is able;
        But when everything's cleared,
        He gives way to the weird,
        As he lovingly busses each table.

        --
        --
        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+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Ben Fritz
        ... As Tony suggested, check the value you have for diffexpr . I just did a fresh install of Vim 7.4 and did: gvim -N -u NONE -i NONE ... This actually leaves
        Message 3 of 22 , Aug 12, 2013
          On Monday, August 12, 2013 7:59:03 AM UTC-5, Marcio Gil wrote:
          > I installed vim 7.4 today. Now the "Diff with vim" option don't work.
          > E810: Cannot read or write temp files
          > E97: Cannot create diffs

          As Tony suggested, check the value you have for 'diffexpr'.

          I just did a fresh install of Vim 7.4 and did:

          gvim -N -u NONE -i NONE
          :source $VIMRUNTIME/vimrc_example.vim

          This actually leaves 'diffexpr' empty.

          I was then able to view a diff without seeing any error messages.

          Vim is also using the correct 'diff.exe' distributed with Vim:

          :!start cmd
          C:\Users\btfritz>where diff
          C:\Program Files (x86)\vim\vim74\diff.exe

          I guess probably your diffexpr is not correct.

          --
          --
          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+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Marcio Gil
          ... diffexpr=MyDiff() then I put the line: echo ! . cmd . . opt . arg1 . . arg2 . . arg3 . eq before this in the _vimrc (copied from
          Message 4 of 22 , Aug 12, 2013
            Em 12/08/2013 12:16, Ben Fritz escreveu:
            > On Monday, August 12, 2013 7:59:03 AM UTC-5, Marcio Gil wrote:
            >> I installed vim 7.4 today. Now the "Diff with vim" option don't work.
            >> E810: Cannot read or write temp files
            >> E97: Cannot create diffs
            >
            > As Tony suggested, check the value you have for 'diffexpr'.
            >
            > I just did a fresh install of Vim 7.4 and did:
            >
            > gvim -N -u NONE -i NONE
            > :source $VIMRUNTIME/vimrc_example.vim
            >
            > This actually leaves 'diffexpr' empty.
            >
            > I was then able to view a diff without seeing any error messages.
            >
            > Vim is also using the correct 'diff.exe' distributed with Vim:
            >
            > :!start cmd
            > C:\Users\btfritz>where diff
            > C:\Program Files (x86)\vim\vim74\diff.exe
            >
            > I guess probably your diffexpr is not correct.
            >
            :set diffexpr?
            diffexpr=MyDiff()

            then I put the line:
            echo '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq

            before this in the _vimrc (copied from vimrc_example.vim):
            silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
            arg3 . eq

            :vert diffsp vimrc~
            !""C:\Program Files (x86)\Vim\vim74\diff" -a --binnary
            C:\Users\Marcio\AppData\Local\Temp\VIo4C8B.tmp
            C:\Users\Marcio\AppData\Local\Temp\VIn4C8C.tmp >
            C:\Users\Marcio\AppData\Local\Temp\VId4C8D.tmp"
            E810: Cannot read or write temp files
            E97: Cannot create diffs

            I just remove the MyDiff() function from _vimrc then the diff works!
            It is Ok for me, but is there a failure in the Vim instalation?

            --
            --
            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+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Ben Fritz
            ... The latest vimrc_example.vim distributed with version 7.4 no longer contains the diffexpr setting. ... One of the changes in 7.4 compared to 7.3.0 is
            Message 5 of 22 , Aug 12, 2013
              On Monday, August 12, 2013 1:32:17 PM UTC-5, Marcio Gil wrote:
              > :set diffexpr?
              >
              > diffexpr=MyDiff()
              >
              >
              >
              > then I put the line:
              >
              > echo '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
              >
              >
              >
              > before this in the _vimrc (copied from vimrc_example.vim):
              >
              > silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
              >
              > arg3 . eq
              >
              >

              The latest vimrc_example.vim distributed with version 7.4 no longer contains the diffexpr setting.

              >
              > :vert diffsp vimrc~
              >
              > !""C:\Program Files (x86)\Vim\vim74\diff" -a --binnary
              >
              > C:\Users\Marcio\AppData\Local\Temp\VIo4C8B.tmp
              >
              > C:\Users\Marcio\AppData\Local\Temp\VIn4C8C.tmp >
              >
              > C:\Users\Marcio\AppData\Local\Temp\VId4C8D.tmp"
              >
              > E810: Cannot read or write temp files
              >
              > E97: Cannot create diffs
              >
              >

              One of the changes in 7.4 compared to 7.3.0 is improving the external command handling on Windows, so that you no longer need to add extra " characters around the entire command. See the series of patches starting at 7.3.443 for details. So with your diffexpr, there are now extra quote characters.

              >
              > I just remove the MyDiff() function from _vimrc then the diff works!
              >
              > It is Ok for me, but is there a failure in the Vim instalation?

              Not a failure in the install, since those lines aren't in the vimrc_example file any longer.

              --
              --
              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+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Marcio Gil
              ... Checked. The problem was a remaining old _vimrc file. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below
              Message 6 of 22 , Aug 12, 2013
                > Not a failure in the install, since those lines aren't in the vimrc_example file any longer.
                >
                Checked. The problem was a remaining old _vimrc file.

                --
                --
                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+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Tony Mechelynck
                ... No. Your _vimrc is not part of the Vim installation. If you made an unwarranted change in your vimrc, and removing that change cures your problem, well,
                Message 7 of 22 , Aug 12, 2013
                  On 12/08/13 20:32, Marcio Gil wrote:
                  > Em 12/08/2013 12:16, Ben Fritz escreveu:
                  >> On Monday, August 12, 2013 7:59:03 AM UTC-5, Marcio Gil wrote:
                  >>> I installed vim 7.4 today. Now the "Diff with vim" option don't work.
                  >>> E810: Cannot read or write temp files
                  >>> E97: Cannot create diffs
                  >>
                  >> As Tony suggested, check the value you have for 'diffexpr'.
                  >>
                  >> I just did a fresh install of Vim 7.4 and did:
                  >>
                  >> gvim -N -u NONE -i NONE
                  >> :source $VIMRUNTIME/vimrc_example.vim
                  >>
                  >> This actually leaves 'diffexpr' empty.
                  >>
                  >> I was then able to view a diff without seeing any error messages.
                  >>
                  >> Vim is also using the correct 'diff.exe' distributed with Vim:
                  >>
                  >> :!start cmd
                  >> C:\Users\btfritz>where diff
                  >> C:\Program Files (x86)\vim\vim74\diff.exe
                  >>
                  >> I guess probably your diffexpr is not correct.
                  >>
                  > :set diffexpr?
                  > diffexpr=MyDiff()
                  >
                  > then I put the line:
                  > echo '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
                  >
                  > before this in the _vimrc (copied from vimrc_example.vim):
                  > silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
                  > arg3 . eq
                  >
                  > :vert diffsp vimrc~
                  > !""C:\Program Files (x86)\Vim\vim74\diff" -a --binnary
                  > C:\Users\Marcio\AppData\Local\Temp\VIo4C8B.tmp
                  > C:\Users\Marcio\AppData\Local\Temp\VIn4C8C.tmp >
                  > C:\Users\Marcio\AppData\Local\Temp\VId4C8D.tmp"
                  > E810: Cannot read or write temp files
                  > E97: Cannot create diffs
                  >
                  > I just remove the MyDiff() function from _vimrc then the diff works!
                  > It is Ok for me, but is there a failure in the Vim instalation?
                  >

                  No. Your _vimrc is not part of the Vim installation. If you made an
                  unwarranted change in your vimrc, and removing that change cures your
                  problem, well, what can I say? Starting Vim as
                  vim -u NONE -N
                  or even as
                  C:
                  cd "\Program Files (x86)\vim\vim74"
                  vim -u .\vimrc_example.vim
                  ought to work. Making sure that your vimrc is sane is up to you.





                  Where was that 'diffexpr' set?

                  :verbose set diffexpr?

                  There is no MyDiff() in the vimrc_example.vim for Vim 7.4, but there is
                  one under ":help diff-diffexpr". Are you sure you copied it exactly?
                  What you typed above doesn't look the same to me as what I see in the
                  help. Where is the "cmd" variable set? How come you got --binnary with
                  two n's? This is what _I_ see in the help:

                  > Example (this does almost the same as 'diffexpr' being empty): >
                  >
                  > set diffexpr=MyDiff()
                  > function MyDiff()
                  > let opt = ""
                  > if &diffopt =~ "icase"
                  > let opt = opt . "-i "
                  > endif
                  > if &diffopt =~ "iwhite"
                  > let opt = opt . "-b "
                  > endif
                  > silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new .
                  > \ " > " . v:fname_out
                  > endfunction
                  >
                  > The "-a" argument is used to force comparing the files as text, comparing as
                  > binaries isn't useful. The "--binary" argument makes the files read in binary
                  > mode, so that a CTRL-Z doesn't end the text on DOS.

                  Notice v:fname_in, v:fname_out and v:fname_new which aren't the same as
                  arg1 arg2 arg3.



                  Best regards,
                  Tony.
                  --
                  I am NOMAD!


                  --
                  --
                  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+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Gary Johnson
                  ... That s not true. On Windows, at least prior to Vim 7.4, _vimrc _is_ part of the Vim installation. MyDiff() is/was part of the standard _vimrc installed
                  Message 8 of 22 , Aug 12, 2013
                    On 2013-08-12, Tony Mechelynck wrote:
                    > On 12/08/13 20:32, Marcio Gil wrote:
                    > >Em 12/08/2013 12:16, Ben Fritz escreveu:
                    > >>On Monday, August 12, 2013 7:59:03 AM UTC-5, Marcio Gil wrote:
                    > >>>I installed vim 7.4 today. Now the "Diff with vim" option don't work.
                    > >>>E810: Cannot read or write temp files
                    > >>>E97: Cannot create diffs
                    > >>
                    > >>As Tony suggested, check the value you have for 'diffexpr'.
                    > >>
                    > >>I just did a fresh install of Vim 7.4 and did:
                    > >>
                    > >>gvim -N -u NONE -i NONE
                    > >>:source $VIMRUNTIME/vimrc_example.vim
                    > >>
                    > >>This actually leaves 'diffexpr' empty.
                    > >>
                    > >>I was then able to view a diff without seeing any error messages.
                    > >>
                    > >>Vim is also using the correct 'diff.exe' distributed with Vim:
                    > >>
                    > >>:!start cmd
                    > >>C:\Users\btfritz>where diff
                    > >>C:\Program Files (x86)\vim\vim74\diff.exe
                    > >>
                    > >>I guess probably your diffexpr is not correct.
                    > >>
                    > >:set diffexpr?
                    > >diffexpr=MyDiff()
                    > >
                    > >then I put the line:
                    > > echo '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
                    > >
                    > >before this in the _vimrc (copied from vimrc_example.vim):
                    > > silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
                    > >arg3 . eq
                    > >
                    > >:vert diffsp vimrc~
                    > >!""C:\Program Files (x86)\Vim\vim74\diff" -a --binnary
                    > >C:\Users\Marcio\AppData\Local\Temp\VIo4C8B.tmp
                    > >C:\Users\Marcio\AppData\Local\Temp\VIn4C8C.tmp >
                    > >C:\Users\Marcio\AppData\Local\Temp\VId4C8D.tmp"
                    > >E810: Cannot read or write temp files
                    > >E97: Cannot create diffs
                    > >
                    > >I just remove the MyDiff() function from _vimrc then the diff works!
                    > >It is Ok for me, but is there a failure in the Vim instalation?
                    > >
                    >
                    > No. Your _vimrc is not part of the Vim installation.

                    That's not true. On Windows, at least prior to Vim 7.4, _vimrc _is_
                    part of the Vim installation. MyDiff() is/was part of the standard
                    _vimrc installed under C:\Program Files\Vim (the XP path).

                    I've been bitten by this before, where I made changes to that
                    _vimrc, then updated to a newer version of Vim but excluded _vimrc
                    from the update and couldn't execute diffs because the new version
                    of Vim had changed MyDiff().

                    Now I save my old _vimrc, let the installer create a new _vimrc, and
                    check the differences.

                    I've also stopped using that system _vimrc and use ~/_vimrc instead,
                    but I still check for changes to the system _vimrc.

                    Regards,
                    Gary

                    --
                    --
                    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+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  • Tony Mechelynck
                    ... Installing a _vimrc for you the first time is an option, and the installer does it IIRC by copying the vimrc_example.vim, which leaves you in the cold if a
                    Message 9 of 22 , Aug 12, 2013
                      On 12/08/13 22:10, Gary Johnson wrote:
                      > On 2013-08-12, Tony Mechelynck wrote:
                      >> On 12/08/13 20:32, Marcio Gil wrote:
                      >>> Em 12/08/2013 12:16, Ben Fritz escreveu:
                      >>>> On Monday, August 12, 2013 7:59:03 AM UTC-5, Marcio Gil wrote:
                      >>>>> I installed vim 7.4 today. Now the "Diff with vim" option don't work.
                      >>>>> E810: Cannot read or write temp files
                      >>>>> E97: Cannot create diffs
                      >>>>
                      >>>> As Tony suggested, check the value you have for 'diffexpr'.
                      >>>>
                      >>>> I just did a fresh install of Vim 7.4 and did:
                      >>>>
                      >>>> gvim -N -u NONE -i NONE
                      >>>> :source $VIMRUNTIME/vimrc_example.vim
                      >>>>
                      >>>> This actually leaves 'diffexpr' empty.
                      >>>>
                      >>>> I was then able to view a diff without seeing any error messages.
                      >>>>
                      >>>> Vim is also using the correct 'diff.exe' distributed with Vim:
                      >>>>
                      >>>> :!start cmd
                      >>>> C:\Users\btfritz>where diff
                      >>>> C:\Program Files (x86)\vim\vim74\diff.exe
                      >>>>
                      >>>> I guess probably your diffexpr is not correct.
                      >>>>
                      >>> :set diffexpr?
                      >>> diffexpr=MyDiff()
                      >>>
                      >>> then I put the line:
                      >>> echo '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
                      >>>
                      >>> before this in the _vimrc (copied from vimrc_example.vim):
                      >>> silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
                      >>> arg3 . eq
                      >>>
                      >>> :vert diffsp vimrc~
                      >>> !""C:\Program Files (x86)\Vim\vim74\diff" -a --binnary
                      >>> C:\Users\Marcio\AppData\Local\Temp\VIo4C8B.tmp
                      >>> C:\Users\Marcio\AppData\Local\Temp\VIn4C8C.tmp >
                      >>> C:\Users\Marcio\AppData\Local\Temp\VId4C8D.tmp"
                      >>> E810: Cannot read or write temp files
                      >>> E97: Cannot create diffs
                      >>>
                      >>> I just remove the MyDiff() function from _vimrc then the diff works!
                      >>> It is Ok for me, but is there a failure in the Vim instalation?
                      >>>
                      >>
                      >> No. Your _vimrc is not part of the Vim installation.
                      >
                      > That's not true. On Windows, at least prior to Vim 7.4, _vimrc _is_
                      > part of the Vim installation. MyDiff() is/was part of the standard
                      > _vimrc installed under C:\Program Files\Vim (the XP path).

                      Installing a _vimrc for you the first time is an option, and the
                      installer does it IIRC by copying the vimrc_example.vim, which leaves
                      you in the cold if a later version of Vim comes with a different
                      vimrc_example.vim.

                      Rather than use that preinstalled vimrc, I write my own, with the line

                      runtime vimrc_example.vim

                      followed (or, in rare cases, preceded) by my own customizations and
                      overrides. This means any changes in the vimrc_example.vim between one
                      version and the next are automagically taken in, and if there are things
                      I don't like in this new stuff I can still override them after coming
                      back from the :runtime command.

                      >
                      > I've been bitten by this before, where I made changes to that
                      > _vimrc, then updated to a newer version of Vim but excluded _vimrc
                      > from the update and couldn't execute diffs because the new version
                      > of Vim had changed MyDiff().
                      >
                      > Now I save my old _vimrc, let the installer create a new _vimrc, and
                      > check the differences.
                      >
                      > I've also stopped using that system _vimrc and use ~/_vimrc instead,
                      > but I still check for changes to the system _vimrc.

                      $VIM/_vimrc is not a "system vimrc", it is one possible location on
                      DOS/Windows for the "user vimrc" on single-user systems where $HOME has
                      no sane value. The system vimrc is (by default) $VIM/vimrc without the
                      leading dot or underscore. Using $HOME/_vimrc or $HOME/.vimrc is better:
                      it frees your own vimrc from being at a location defined by the
                      installation directory, and, on multiuser systems, it allows a different
                      vimrc for each user. A new development in Vim 7.3.1178 and later, not
                      backward compatible but allowing to place Vim on a USB stick, is to use
                      ~/.vim/vimrc (or, on Windows, ~/vimfiles/_vimrc) so all your
                      user-customization files are in a single directory.

                      On my Linux system, the Vim executables which come from my distro are
                      compiled with a system vimrc at /etc/vimrc instead, so my own-compiled
                      builds look at the default $VIM/vimrc and find nothing there, which is
                      exactly what I want. (My user vimrc is, of course, at $HOME/.vimrc)

                      >
                      > Regards,
                      > Gary
                      >
                      Best regards,
                      Tony.
                      --
                      Jesuit priests are DATING CAREER DIPLOMATS!!

                      --
                      --
                      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+unsubscribe@....
                      For more options, visit https://groups.google.com/groups/opt_out.
                    • Gary Johnson
                      ... The last time I installed Vim for Windows (from the Cream site) was around the first of the year and this was the file installed in C: Program
                      Message 10 of 22 , Aug 12, 2013
                        On 2013-08-12, Tony Mechelynck wrote:
                        > On 12/08/13 22:10, Gary Johnson wrote:
                        > >On 2013-08-12, Tony Mechelynck wrote:

                        > >>No. Your _vimrc is not part of the Vim installation.
                        > >
                        > >That's not true. On Windows, at least prior to Vim 7.4, _vimrc _is_
                        > >part of the Vim installation. MyDiff() is/was part of the standard
                        > >_vimrc installed under C:\Program Files\Vim (the XP path).
                        >
                        > Installing a _vimrc for you the first time is an option, and the
                        > installer does it IIRC by copying the vimrc_example.vim, which leaves
                        > you in the cold if a later version of Vim comes with a different
                        > vimrc_example.vim.

                        The last time I installed Vim for Windows (from the Cream site) was
                        around the first of the year and this was the file installed in
                        C:\Program Files\vim\_vimrc (i.e., $VIM/_vimrc):

                        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

                        It is not a copy of vimrc_example.vim, it sources vimrc_example.vim.
                        And it defines MyDiff(). So, one is not left in the cold by later
                        changes to vimrc_example.vim, but one is by later changes to
                        MyDiff().

                        I share the same .vimrc/_vimrc file among all the systems on which I
                        use Vim. I've found MyDiff() useful even on Linux because it lets
                        me specify a few extra flags to diff and because it lets me hook the
                        entry-into-diff-mode event.

                        > >I've also stopped using that system _vimrc and use ~/_vimrc instead,
                        > >but I still check for changes to the system _vimrc.
                        >
                        > $VIM/_vimrc is not a "system vimrc", it is one possible location on
                        > DOS/Windows for the "user vimrc" on single-user systems where $HOME
                        > has no sane value.

                        You're right. I didn't think of it as a user vimrc since it's
                        shared by all users of the Windows system and I didn't look up the
                        proper name for it.

                        Regards,
                        Gary

                        --
                        --
                        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+unsubscribe@....
                        For more options, visit https://groups.google.com/groups/opt_out.
                      • Ben Fritz
                        ... From later discussion, it came out that the culprit was not vimrc_example.vim but rather $VIM/_vimrc. So I retested. This also works fine with the
                        Message 11 of 22 , Aug 12, 2013
                          On Monday, August 12, 2013 10:16:34 AM UTC-5, Ben Fritz wrote:
                          > On Monday, August 12, 2013 7:59:03 AM UTC-5, Marcio Gil wrote:
                          > > I installed vim 7.4 today. Now the "Diff with vim" option don't work.
                          > > E810: Cannot read or write temp files
                          > > E97: Cannot create diffs
                          >
                          > As Tony suggested, check the value you have for 'diffexpr'.
                          >
                          > I just did a fresh install of Vim 7.4 and did:
                          >
                          > gvim -N -u NONE -i NONE
                          > :source $VIMRUNTIME/vimrc_example.vim
                          >
                          > This actually leaves 'diffexpr' empty.
                          >
                          > I was then able to view a diff without seeing any error messages.
                          >
                          > Vim is also using the correct 'diff.exe' distributed with Vim:
                          >
                          > :!start cmd
                          > C:\Users\btfritz>where diff
                          > C:\Program Files (x86)\vim\vim74\diff.exe
                          >
                          > I guess probably your diffexpr is not correct.

                          From later discussion, it came out that the culprit was not vimrc_example.vim but rather $VIM/_vimrc.

                          So I retested. This also works fine with the installed 7.4 copy:

                          gvim -N -u NONE -i NONE
                          :source $VIM/_vimrc

                          Here, 'diffexpr' is actually set to something. But apparently the issue has been resolved.

                          --
                          --
                          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+unsubscribe@....
                          For more options, visit https://groups.google.com/groups/opt_out.
                        • Tony Mechelynck
                          ... I don t understand the else branch of that :if &sh =~ conditional. If not using a cmd shell, «Program Files (x86)» will become «Program Files
                          Message 12 of 22 , Aug 12, 2013
                            On 12/08/13 23:44, Gary Johnson wrote:
                            > On 2013-08-12, Tony Mechelynck wrote:
                            >> On 12/08/13 22:10, Gary Johnson wrote:
                            >>> On 2013-08-12, Tony Mechelynck wrote:
                            >
                            >>>> No. Your _vimrc is not part of the Vim installation.
                            >>>
                            >>> That's not true. On Windows, at least prior to Vim 7.4, _vimrc _is_
                            >>> part of the Vim installation. MyDiff() is/was part of the standard
                            >>> _vimrc installed under C:\Program Files\Vim (the XP path).
                            >>
                            >> Installing a _vimrc for you the first time is an option, and the
                            >> installer does it IIRC by copying the vimrc_example.vim, which leaves
                            >> you in the cold if a later version of Vim comes with a different
                            >> vimrc_example.vim.
                            >
                            > The last time I installed Vim for Windows (from the Cream site) was
                            > around the first of the year and this was the file installed in
                            > C:\Program Files\vim\_vimrc (i.e., $VIM/_vimrc):
                            >
                            > 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

                            I don't understand the "else" branch of that ":if &sh =~" conditional.
                            If not using a "cmd" shell, «Program Files (x86)» will become «Program"
                            Files (x86)» :-???

                            You will have to change those arg1 arg2 arg3, in 7.4 they have become
                            something else. If you want a vimrc that will work with versions old and
                            new you will have to try both, either with ":if exists" or with a try
                            block (a feature which, however, was new in 6.2).
                            >
                            > It is not a copy of vimrc_example.vim, it sources vimrc_example.vim.
                            > And it defines MyDiff(). So, one is not left in the cold by later
                            > changes to vimrc_example.vim, but one is by later changes to
                            > MyDiff().

                            OK, so at least that has changed since I was on Windows several years
                            ago. It still sources mswin.vim, which masks several useful Vim
                            keybindings on the pretext of making life easier for Windows users (IMHO
                            it doesn't; it just cripples Vim).

                            Personally I don't source that file (I wouldn't touch it with the
                            proverbial ten-foot pole), and I use neither ":behave mswin" nor
                            ":behave xterm" but something in-between, as follows:

                            " selectmode=key,mouse and mousemodel=popup as with mswin
                            " selection=inclusive as with xterm
                            " keymodel=startsel - shift-left starts a selection but
                            " non-shift-left doesn't stop it: it extends it
                            " instead, just like shift-left-again
                            set selection=inclusive selectmode=key,mouse
                            set keymodel=startsel mousemodel=popup

                            I believe it gives me the best of both worlds, but YMMV.

                            >
                            > I share the same .vimrc/_vimrc file among all the systems on which I
                            > use Vim. I've found MyDiff() useful even on Linux because it lets
                            > me specify a few extra flags to diff and because it lets me hook the
                            > entry-into-diff-mode event.
                            >
                            >>> I've also stopped using that system _vimrc and use ~/_vimrc instead,
                            >>> but I still check for changes to the system _vimrc.
                            >>
                            >> $VIM/_vimrc is not a "system vimrc", it is one possible location on
                            >> DOS/Windows for the "user vimrc" on single-user systems where $HOME
                            >> has no sane value.
                            >
                            > You're right. I didn't think of it as a user vimrc since it's
                            > shared by all users of the Windows system and I didn't look up the
                            > proper name for it.
                            >
                            > Regards,
                            > Gary
                            >
                            Best regards,
                            Tony.
                            --
                            BEDEVERE: And that, my lord, is how we know the Earth to be banana-shaped.
                            "Monty Python and the Holy Grail" PYTHON (MONTY)
                            PICTURES LTD

                            --
                            --
                            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+unsubscribe@....
                            For more options, visit https://groups.google.com/groups/opt_out.
                          • Stephen Lin
                            Hi, ... echo ! . cmd . . opt . arg1 . . arg2 . . arg3 . eq ... silent execute ! . cmd . . opt . arg1 . . arg2 . . arg3 . eq
                            Message 13 of 22 , Sep 13, 2013
                              Hi,

                              I read through several replied, including Macio Gill's second post of the following:
                              > then I put the line:
                              echo '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
                              > before this in the _vimrc (copied from vimrc_example.vim):
                              silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' .
                              arg3 . eq

                              Honestly speaking, it is very confusiong because I do not know what "put the line" means. and nor what "silent execute..." means.

                              I did try to follow it and nothing works.

                              This is what I did and it works (and not confusion):

                              1. In Win7, I copied "C:\Program Files (x86)\Vim\-vimrc" files to a directory that I have access right.
                              (such as C:\temp\-vimrc)
                              2. I edited C:\temp\-vimrc with editor
                              - remove all the lines below the 4th line
                              (That is, I deleted lines such as "set diffexpr=MyDiff()"
                              and all the lines below this "set diffexpr=MyDiff()"

                              3. Saved this file
                              4. I manage to copy this file back to "C:\Program Files (x86)\Vim\-vimrc"
                              In Exploer, cut and paste, I was asked "administive right" to over write the existing "C:\Program Files (x86)\Vim\-vimrc"

                              5. I went to the directory where I have 2 files that I want to diff. I highlight those two files with mouse, right click and select "Diff with Vim"

                              6. Now, I no longer get the E810 and E70 errors. Instead, the VIM windows displays the different as expected.



                              --
                              --
                              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+unsubscribe@....
                              For more options, visit https://groups.google.com/groups/opt_out.
                            • AndyHancock
                              I was sifting through the explanations here because I got the same error as the OP. While the explanations presented may apply to many cases, I found a very
                              Message 14 of 22 , Sep 15, 2013
                                I was sifting through the explanations here because I got the same error as the OP. While the explanations presented may apply to many cases, I found a very simple solution that might apply to some situations. The directory "C:\Program Files (x86)\vim" belonged to an account with admin rights and used only for admin purposes, but the permissions were set to allow access only by the owner. This is observed from my cygwin bash command line, but the solution might apply even for people not using cygwin. I wanted to specify this detail because the Windows 7 security model is quite complicated, and what is seen from bash might only give a hint to the true cause of the problem. In any case, the solution was to change the access to the aforementioned directory and all child/descendant folders/files. Change it so that everyone has read and execute permission. For security, keep write permission restricted to owner.

                                Prior to doing the above fix, even the admin owner could not do a vim diff if vim was launched with elevated privileges i.e. right-clicking the vim icon launching as administrator. I have no idea why, because elevated privileges should mean less access problems, but instead I saw the errors in the original post. It might be due to the abomination known as the Windows 7 security model, which creates virtual copies of a directory tree so that what is visible is customized for each user, and indeed, possibly for each privilege level (I don't know, my head spins when I try to comprehend the gyrations they try to do in order to build in security without impeding usage). The custom virtual version of the directory is stored at C:\Users\TheUserOfInterest\AppData\Local\VirtualStore The reason I suspect this is because there should be no reason for the aforementioned directory to be restricted because I'm pretty familiar with the problems that this could cause. It may have been *made* restricted when I deleted the above virtual view of the directory.

                                Welcome to Windows 7. Good attempt at greater security but not without a price.

                                --
                                --
                                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+unsubscribe@....
                                For more options, visit https://groups.google.com/groups/opt_out.
                              • starcas25@...
                                After installing vim 7.4 on Windows XP, I got the exact same errors as the OP when trying to do diffsplit: E810: Cannot read or write temp files E97: Cannot
                                Message 15 of 22 , Oct 10, 2013
                                  After installing vim 7.4 on Windows XP, I got the exact same errors as the OP when trying to do diffsplit:

                                  E810: Cannot read or write temp files
                                  E97: Cannot create diffs

                                  FIX (that worked for me):
                                  In MyDiff() of _vimrc, go to line 13 and change the two single quotes to double quotes. This allows the pattern in the IF-test to match.

                                  So change:
                                  if &sh =~ '\<cmd' (fails)

                                  To:
                                  if &sh =~ "\<cmd" (works)

                                  Or keep single quotes but escape the backslash:
                                  if &sh =~ '\\<cmd' (also works)

                                  Oddly, the original line is technically correct. It seems like there is a bug in vim 7.4 that is swapping the meaning of single and double quotes here.


                                  1 function MyDiff()
                                  2 let opt = '-a --binary '
                                  3 if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
                                  4 if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
                                  5 let arg1 = v:fname_in
                                  6 if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
                                  7 let arg2 = v:fname_new
                                  8 if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
                                  9 let arg3 = v:fname_out
                                  10 if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
                                  11 let eq = ''
                                  12 if $VIMRUNTIME =~ ' '
                                  13>>> if &sh =~ '\<cmd' <<<--- CHANGE TO DOUBLE QUOTES
                                  14 let cmd = '""' . $VIMRUNTIME . '\diff"'
                                  15 let eq = '"'
                                  16 else
                                  17 let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
                                  18 endif
                                  19 else
                                  20 let cmd = $VIMRUNTIME . '\diff'
                                  21 endif
                                  22 silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
                                  23 endfunction

                                  (Credit to fvelasqu...@..., http://code.google.com/p/vim/issues/detail?id=28#c6)

                                  --
                                  --
                                  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+unsubscribe@....
                                  For more options, visit https://groups.google.com/groups/opt_out.
                                • Ben Fritz
                                  ... No, there really isn t. ... This line is incorrect in Vim 7.4 with default settings. If this line actually executes you ll probably have problems with your
                                  Message 16 of 22 , Oct 11, 2013
                                    On Friday, October 11, 2013 12:59:47 AM UTC-5, star...@... wrote:
                                    > After installing vim 7.4 on Windows XP, I got the exact same errors as the OP when trying to do diffsplit:
                                    >
                                    > E810: Cannot read or write temp files
                                    > E97: Cannot create diffs
                                    >
                                    > FIX (that worked for me):
                                    > In MyDiff() of _vimrc, go to line 13 and change the two single quotes to double quotes. This allows the pattern in the IF-test to match.
                                    >
                                    > So change:
                                    > if &sh =~ '\<cmd' (fails)
                                    >
                                    > To:
                                    > if &sh =~ "\<cmd" (works)
                                    >
                                    > Or keep single quotes but escape the backslash:
                                    > if &sh =~ '\\<cmd' (also works)
                                    >
                                    > Oddly, the original line is technically correct. It seems like there is a bug in vim 7.4 that is swapping the meaning of single and double quotes here.
                                    >
                                    >

                                    No, there really isn't.

                                    > 1 function MyDiff()
                                    > 2 let opt = '-a --binary '
                                    > 3 if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
                                    > 4 if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
                                    > 5 let arg1 = v:fname_in
                                    > 6 if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
                                    > 7 let arg2 = v:fname_new
                                    > 8 if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
                                    > 9 let arg3 = v:fname_out
                                    > 10 if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
                                    > 11 let eq = ''
                                    > 12 if $VIMRUNTIME =~ ' '
                                    > 13>>> if &sh =~ '\<cmd' <<<--- CHANGE TO DOUBLE QUOTES
                                    > 14 let cmd = '""' . $VIMRUNTIME . '\diff"'

                                    This line is incorrect in Vim 7.4 with default settings. If this line actually executes you'll probably have problems with your diff. So probably your "fix" works by forcing this line NOT to execute because your shell does NOT match <cmd literally.

                                    > 15 let eq = '"'
                                    > 16 else
                                    > 17 let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
                                    > 18 endif
                                    > 19 else
                                    > 20 let cmd = $VIMRUNTIME . '\diff'
                                    > 21 endif
                                    > 22 silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
                                    > 23 endfunction
                                    >
                                    > (Credit to fvelasqu...@..., http://code.google.com/p/vim/issues/detail?id=28#c6)

                                    Is that in the _vimrc installed by default? Or your own personal _vimrc?

                                    --
                                    --
                                    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+unsubscribe@....
                                    For more options, visit https://groups.google.com/groups/opt_out.
                                  • Michael Chu
                                    I had the same problem as star...@gmail.com after installing Vim on my work laptop running Windows 7, and the solution posted by the user worked for me. It
                                    Message 17 of 22 , Nov 13, 2013
                                      I had the same problem as "star...@..." after installing Vim on my work laptop running Windows 7, and the solution posted by the user worked for me.

                                      It was the default _vimrc that I modified to get vimdiff to work properly.

                                      --
                                      --
                                      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+unsubscribe@....
                                      For more options, visit https://groups.google.com/groups/opt_out.
                                    • Ben Fritz
                                      ... The dosinst.c file creates the default _vimrc file, and contains an issue where there is an old workaround for calling an external program at a path
                                      Message 18 of 22 , Nov 14, 2013
                                        On Wednesday, November 13, 2013 9:48:35 PM UTC-6, Michael Chu wrote:
                                        > I had the same problem as "star...@..." after installing Vim on my work laptop running Windows 7, and the solution posted by the user worked for me.
                                        >
                                        > It was the default _vimrc that I modified to get vimdiff to work properly.

                                        The dosinst.c file creates the default _vimrc file, and contains an issue where there is an old workaround for calling an external program at a path containing spaces. But this old workaround fails with the new default value of shellxquote from the middle of the 7.3 patches. It needs an update.

                                        For now you can remove the logic to add an extra pair of quotes around the entire command, or temporarily set shellxquote to empty inside that function and restore it at the end of the 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+unsubscribe@....
                                        For more options, visit https://groups.google.com/groups/opt_out.
                                      • Ben Fritz
                                        ... I think this patch fixes the installer. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you
                                        Message 19 of 22 , Nov 14, 2013
                                          On Thursday, November 14, 2013 11:31:14 AM UTC-6, Ben Fritz wrote:
                                          > On Wednesday, November 13, 2013 9:48:35 PM UTC-6, Michael Chu wrote:
                                          > > I had the same problem as "star...@..." after installing Vim on my work laptop running Windows 7, and the solution posted by the user worked for me.
                                          > >
                                          > > It was the default _vimrc that I modified to get vimdiff to work properly.
                                          >
                                          > The dosinst.c file creates the default _vimrc file, and contains an issue where there is an old workaround for calling an external program at a path containing spaces. But this old workaround fails with the new default value of shellxquote from the middle of the 7.3 patches. It needs an update.
                                          >
                                          > For now you can remove the logic to add an extra pair of quotes around the entire command, or temporarily set shellxquote to empty inside that function and restore it at the end of the function.

                                          I think this patch fixes the installer.

                                          --
                                          --
                                          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+unsubscribe@....
                                          For more options, visit https://groups.google.com/groups/opt_out.
                                        • Primitivo Roman
                                          ... Add empty for diffexpr to mi vimrc works for me. set diffexpr= ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your
                                          Message 20 of 22 , Dec 19, 2013
                                            El lunes, 12 de agosto de 2013 07:59:03 UTC-5, Marcio Gil escribió:
                                            > I installed vim 7.4 today. Now the "Diff with vim" option don't work.
                                            > E810: Cannot read or write temp files
                                            > E97: Cannot create diffs

                                            Add empty for diffexpr to mi vimrc works for me.

                                            set diffexpr=

                                            :)

                                            --
                                            --
                                            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+unsubscribe@....
                                            For more options, visit https://groups.google.com/groups/opt_out.
                                          • Stromek Doe
                                            ... This worked for me on Windows 7. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are
                                            Message 21 of 22 , May 14 7:46 AM
                                              On Friday, October 11, 2013 7:59:47 AM UTC+2, star...@... wrote:
                                              > So change:
                                              > if &sh =~ '\<cmd' (fails)
                                              >
                                              > To:
                                              > if &sh =~ "\<cmd" (works)

                                              This worked for me on Windows 7.

                                              --
                                              --
                                              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+unsubscribe@....
                                              For more options, visit https://groups.google.com/d/optout.
                                            • Ben Fritz
                                              ... That is the WRONG solution, as I pointed out in the exact next message. What this change does, is it BREAKS the test for the cmd shell. Instead of matching
                                              Message 22 of 22 , May 14 8:25 AM
                                                On Wednesday, May 14, 2014 9:46:32 AM UTC-5, Stromek Doe wrote:
                                                > On Friday, October 11, 2013 7:59:47 AM UTC+2, star...@... wrote:
                                                > > So change:
                                                > > if &sh =~ '\<cmd' (fails)
                                                > >
                                                > > To:
                                                > > if &sh =~ "\<cmd" (works)
                                                >
                                                > This worked for me on Windows 7.

                                                That is the WRONG solution, as I pointed out in the exact next message. What this change does, is it BREAKS the test for the cmd shell. Instead of matching "cmd" as a whole word, now it will try matching "<cmd" with a literal < before it. Obviously this will not match your actual shell on Windows.

                                                The ACTUAL PROBLEM is that the code for the cmd.exe shell was broken.

                                                This problem HAS BEEN FIXED in the latest version of the Vim installer by actually fixing the code for cmd.exe. Unfortunately Bram does not update the "official" installers very often.

                                                So, you can either get an installer from an alternate source: http://vim.wikia.com/wiki/Where_to_download_Vim

                                                Or compile yourself and run the installer: http://vim.wikia.com/wiki/Building_Vim#Building_Vim_on_Windows

                                                Or just copy the result of the default installed .vimrc: http://superuser.com/questions/697847/cant-run-vimdiff-7-4-on-windows-7/697914#697914

                                                --
                                                --
                                                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+unsubscribe@....
                                                For more options, visit https://groups.google.com/d/optout.
                                              Your message has been successfully submitted and would be delivered to recipients shortly.