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

RE: Problem with "without Cream" vim-7.2.303 _vimrc

Expand Messages
  • Steve Hall
    From: John Beckett , Tue, December 01, 2009 10:14 pm ... I m concerned about relying on things outside the default Vim distro since it is too complicated for
    Message 1 of 9 , Dec 2, 2009
    • 0 Attachment
      From: "John Beckett", Tue, December 01, 2009 10:14 pm
      >
      > Sorry, I should have reported this to Steve because the issue
      > came up on the wiki. I put my understanding of the problem and
      > the best solution for a user here:
      > http://vim.wikia.com/wiki/Running_diff
      >
      > We are talking about Windows systems, and I think the "best
      > solution" is to install the GnuWin32 diff package (I believe
      > that all that is needed is to copy the *.exe/*.dll files into a
      > directory in your PATH).

      I'm concerned about relying on things outside the default Vim distro
      since it is too complicated for me to package. Between the various
      versions of Windows and 32- and 64-bit complexities, building binaries
      in addition to the Vim ones is too risky.

      Same goes for putting things outside the application's directory. On
      more and more systems administrators forbid this anyway.

      The gVim Black installers should just work, I feel these issues on
      Windows should be solved by Vim, not the installer.


      > I'm not sure how the Cream install can best solve the problem.
      > If the Vim directory is placed in the PATH, and if licensing
      > allows, putting the current GnuWin32 files in the Vim directory
      > would be best (and remove diffexpr + MyDiff from _vimrc).

      I guess I still don't quite understand why MyDiff is required,
      internally Vim should be able to deal with it's own diff.exe. User
      options should be allowed to override it, but why does the default
      install have to condition use of diff in the vimrc instead of the
      binary?


      --
      Steve Hall [ digitect dancingpaper com ]


      --
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • John Beckett
      ... I m too lazy to check at the moment (I build my own Vim), but does the official Windows distribution of Vim include diff.exe? I have an old system with
      Message 2 of 9 , Dec 2, 2009
      • 0 Attachment
        Steve Hall wrote:
        > I'm concerned about relying on things outside the default Vim
        > distro since it is too complicated for me to package. Between
        > the various versions of Windows and 32- and 64-bit
        > complexities, building binaries in addition to the Vim ones is
        > too risky.
        >
        > Same goes for putting things outside the application's
        > directory. On more and more systems administrators forbid this
        > anyway.
        >
        > The gVim Black installers should just work, I feel these
        > issues on Windows should be solved by Vim, not the installer.
        >
        >> I'm not sure how the Cream install can best solve the
        >> problem. If the Vim directory is placed in the PATH, and if
        >> licensing allows, putting the current GnuWin32 files in the
        >> Vim directory would be best (and remove diffexpr + MyDiff
        >> from _vimrc).
        >
        > I guess I still don't quite understand why MyDiff is
        > required, internally Vim should be able to deal with it's own
        > diff.exe. User options should be allowed to override it, but
        > why does the default install have to condition use of diff in
        > the vimrc instead of the binary?

        I'm too lazy to check at the moment (I build my own Vim), but
        does the official Windows distribution of Vim include diff.exe?
        I have an old system with "Vim without Cream" and its diff.exe
        (given "--version" argument) says

        diff - GNU diffutils version 2.7

        On Windows, the diff that I use is GNU diffutils 2.8.7 but I
        think it requires gutils.dll.

        A quick test makes me think that the diff 2.7 in Cream will work
        with no MyDiff function. I can well understand that you do not
        want to fiddle around distributing the current diffutils, but
        perhaps you could try removing the following from vimrc:

        set diffexpr=MyDiff()
        the MyDiff() function

        then check if gvim can still do differences. I'm not entirely
        sure why, but my quick test indicates that with gvim.exe and
        diff.exe in the same directory (a directory that is not in the
        PATH), gvim can still invoke diff with no MyDiff. I guess that
        whatever system call gvim is using to spawn diff is causing
        Windows to search the same directory as gvim.

        John

        --
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Gary Johnson
        ... I just ran that experiment on this minimalist system on which I had installed vim without Cream 7.2.303. I commented-out the set diffexpr=MyDiff()
        Message 3 of 9 , Dec 2, 2009
        • 0 Attachment
          On 2009-12-03, John Beckett wrote:
          > Steve Hall wrote:

          > > I guess I still don't quite understand why MyDiff is
          > > required, internally Vim should be able to deal with it's own
          > > diff.exe. User options should be allowed to override it, but
          > > why does the default install have to condition use of diff in
          > > the vimrc instead of the binary?
          >
          > I'm too lazy to check at the moment (I build my own Vim), but
          > does the official Windows distribution of Vim include diff.exe?
          > I have an old system with "Vim without Cream" and its diff.exe
          > (given "--version" argument) says
          >
          > diff - GNU diffutils version 2.7
          >
          > On Windows, the diff that I use is GNU diffutils 2.8.7 but I
          > think it requires gutils.dll.
          >
          > A quick test makes me think that the diff 2.7 in Cream will work
          > with no MyDiff function. I can well understand that you do not
          > want to fiddle around distributing the current diffutils, but
          > perhaps you could try removing the following from vimrc:
          >
          > set diffexpr=MyDiff()
          > the MyDiff() function
          >
          > then check if gvim can still do differences. I'm not entirely
          > sure why, but my quick test indicates that with gvim.exe and
          > diff.exe in the same directory (a directory that is not in the
          > PATH), gvim can still invoke diff with no MyDiff. I guess that
          > whatever system call gvim is using to spawn diff is causing
          > Windows to search the same directory as gvim.

          I just ran that experiment on this minimalist system on which I had
          installed vim "without Cream" 7.2.303. I commented-out the "set
          diffexpr=MyDiff()" line in my _vimrc, then executed "Diff with Vim"
          from the Explorer context menu on a couple of files. It worked
          fine!

          Running "diff.exe --version" on the diff.exe in vim\vim72 also shows

          diff - GNU diffutils version 2.7

          Regards,
          Gary


          --
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • Steve Hall
          ... Yes, in fact the one provided by the default Vim distro. ... I have not updated this in ages, I believe it is the default from the tarball but am not on a
          Message 4 of 9 , Dec 2, 2009
          • 0 Attachment
            On Thu, 2009-12-03 at 10:02 +1100, John Beckett wrote:
            >
            > I'm too lazy to check at the moment (I build my own Vim), but
            > does the official Windows distribution of Vim include diff.exe?

            Yes, in fact the one provided by the default Vim distro.

            > I have an old system with "Vim without Cream" and its diff.exe
            > (given "--version" argument) says
            >
            > diff - GNU diffutils version 2.7

            I have not updated this in ages, I believe it is the default from the
            tarball but am not on a Windows box to check.

            > On Windows, the diff that I use is GNU diffutils 2.8.7 but I
            > think it requires gutils.dll.

            Hmm, so then the original MyDiff() might have been ok for you?

            > A quick test makes me think that the diff 2.7 in Cream will work
            > with no MyDiff function.

            I'm just want to be as close to the default distro as possible. I'll
            update the vimrc to use the updated function you originally included
            and not make any judgements about what it *should* be. (A good topic
            for this list maybe.)

            > I can well understand that you do not want to fiddle around
            > distributing the current diffutils, but perhaps you could try
            > removing the following from vimrc:
            >
            > set diffexpr=MyDiff()
            > the MyDiff() function
            >
            > then check if gvim can still do differences. I'm not entirely
            > sure why, but my quick test indicates that with gvim.exe and
            > diff.exe in the same directory (a directory that is not in the
            > PATH), gvim can still invoke diff with no MyDiff. I guess that
            > whatever system call gvim is using to spawn diff is causing
            > Windows to search the same directory as gvim.

            I'm not sure why or how Vim uses diff the way it does, but I would
            have thought this would have been worked out ages ago. My biggest
            concern is that maybe our packaging isn't up to date?

            --
            Steve Hall [ digitect dancingpaper com ]


            --
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • Steve Hall
            ... Then I wonder what the origins of MyDiff() are? Why did it come about? -- Steve Hall [ digitect dancingpaper com ] -- You received this message from the
            Message 5 of 9 , Dec 2, 2009
            • 0 Attachment
              On Wed, 2009-12-02 at 15:33 -0800, Gary Johnson wrote:
              >
              > I just ran that experiment on this minimalist system on which I had
              > installed vim "without Cream" 7.2.303. I commented-out the "set
              > diffexpr=MyDiff()" line in my _vimrc, then executed "Diff with Vim"
              > from the Explorer context menu on a couple of files. It worked
              > fine!

              Then I wonder what the origins of MyDiff() are? Why did it come about?

              --
              Steve Hall [ digitect dancingpaper com ]


              --
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
            • John Beckett
              ... No. People have complained on the wiki that the Vim without Cream distribution does NOT work with diff. There were several misguided suggestions for how
              Message 6 of 9 , Dec 2, 2009
              • 0 Attachment
                Steve Hall wrote:
                > Hmm, so then the original MyDiff() might have been ok for you?

                No. People have complained on the wiki that the "Vim without
                Cream" distribution does NOT work with diff. There were several
                misguided suggestions for how to make it work. Last March, I did
                some quick investigations and rewrote the tip:

                http://vim.wikia.com/wiki/Running_diff

                For anyone interested, here is how the tip looked before my
                rewrite:
                http://vim.wikia.com/index.php?title=Running_diff&oldid=22184

                I should set up a clean Windows virtual machine and install the
                standard Vim distribution to see what it does. Maybe later...

                John

                --
                You received this message from the "vim_dev" maillist.
                For more information, visit http://www.vim.org/maillist.php
              • Henrik Öhman
                ... I was wondering why I hadn t discovered this problem, and then I realised it s because I haven t used the _vimrc that Vim without Cream uses since I
                Message 7 of 9 , Dec 3, 2009
                • 0 Attachment
                  On Dec 3, 2:14 am, "John Beckett" <johnb.beck...@...> wrote:
                  > Steve Hall wrote:
                  > > Hmm, so then the original MyDiff() might have been ok for you?
                  >
                  > No. People have complained on the wiki that the "Vim without
                  > Cream" distribution does NOT work with diff. There were several
                  > misguided suggestions for how to make it work. Last March, I did
                  > some quick investigations and rewrote the tip:
                  >
                  > http://vim.wikia.com/wiki/Running_diff

                  I was wondering why I hadn't discovered this problem, and then I
                  realised it's because I haven't used the _vimrc that "Vim without
                  Cream" uses since I first installed Vim. Diffing with Vim on Windows
                  works excellently with 'diffexpr=', and I suggest that Steve removes
                  the setting of 'diffexpr' and the MyDiff() function from the default
                  _vimrc.

                  While we're at it, I also suggest removing 'source $VIMRUNTIME/
                  mswin.vim'. It might seem that it makes the transition to Vim for
                  windows users easier, when all it really does is delay the inevitable
                  'learn to use Vim the way it was meant to be used' brick wall that
                  every user has to run into sooner or later. At the very least, there
                  should be a warning sign on that line, saying that using 'mswin.vim'
                  changes the default behaviour of Vim, and that it might cause
                  confusion when asking for help. (Also note that 'mswin.vim' does
                  'behave mswin', so that line is redundant anyway.)

                  I'd prefer just using 'vimrc_example.vim' as the default _vimrc for
                  Windows. It contains good defaults, and good comments, and it helps
                  the user to understand what the _vimrc is. For more opinions, I think
                  raising the question on vim_use would be a good idea.

                  Henrik.

                  --
                  You received this message from the "vim_dev" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                • Steve Hall
                  ... I have to admit, I haven t used a default vimrc since 1999. :) ... It is up to the Vim project (Bram) to decide what the default _vimrc is, our distro is
                  Message 8 of 9 , Dec 3, 2009
                  • 0 Attachment
                    On Thu, 2009-12-03 at 03:49 -0800, Henrik Öhman wrote:
                    >
                    > I was wondering why I hadn't discovered this problem, and then I
                    > realised it's because I haven't used the _vimrc that "Vim without
                    > Cream" uses since I first installed Vim.

                    I have to admit, I haven't used a default vimrc since 1999. :)

                    > Diffing with Vim on Windows works excellently with 'diffexpr=', and
                    > I suggest that Steve removes the setting of 'diffexpr' and the
                    > MyDiff() function from the default _vimrc.

                    It is up to the Vim project (Bram) to decide what the default _vimrc
                    is, our distro is simply going to mirror it.

                    > While we're at it, I also suggest removing 'source $VIMRUNTIME/
                    > mswin.vim'. It might seem that it makes the transition to Vim for
                    > windows users easier, when all it really does is delay the
                    > inevitable 'learn to use Vim the way it was meant to be used' brick
                    > wall that every user has to run into sooner or later. At the very
                    > least, there should be a warning sign on that line, saying that
                    > using 'mswin.vim' changes the default behaviour of Vim, and that it
                    > might cause confusion when asking for help. (Also note that
                    > 'mswin.vim' does 'behave mswin', so that line is redundant anyway.)

                    Again, I believe referencing mswin in the vimrc is the default, which
                    is the only reason our distro does it.

                    I agree with your sentiments regarding the suitability of mswin, too,
                    although in addition to your "learning Vim" concerns, I include that
                    it also doesn't go far enough to help on the other side. Windows
                    applications (as well as Mac and Gnome ones) use a whole set of common
                    interface rules that mswin does not address, and so a user referencing
                    it is left in a sort of semi-Vim state. (And no where close to a CUA
                    state as they might expect.) Say, I know a configuration that does
                    this though... :)

                    > I'd prefer just using 'vimrc_example.vim' as the default _vimrc for
                    > Windows. It contains good defaults, and good comments, and it helps
                    > the user to understand what the _vimrc is. For more opinions, I
                    > think raising the question on vim_use would be a good idea.

                    I'm happy to adjust our distro to do whatever ends up in the default
                    Vim distribution.


                    --
                    Steve Hall [ digitect dancingpaper com ]


                    --
                    You received this message from the "vim_dev" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                  • Tony Mechelynck
                    ... I suggested years ago that mswin.vim be removed (when still on Vim 6.1 [my first Vim], I think, and in any case no later than 6.3) and AFAICT most
                    Message 9 of 9 , Dec 3, 2009
                    • 0 Attachment
                      On 03/12/09 12:49, Henrik Öhman wrote:
                      > On Dec 3, 2:14 am, "John Beckett"<johnb.beck...@...> wrote:
                      >> Steve Hall wrote:
                      >>> Hmm, so then the original MyDiff() might have been ok for you?
                      >>
                      >> No. People have complained on the wiki that the "Vim without
                      >> Cream" distribution does NOT work with diff. There were several
                      >> misguided suggestions for how to make it work. Last March, I did
                      >> some quick investigations and rewrote the tip:
                      >>
                      >> http://vim.wikia.com/wiki/Running_diff
                      >
                      > I was wondering why I hadn't discovered this problem, and then I
                      > realised it's because I haven't used the _vimrc that "Vim without
                      > Cream" uses since I first installed Vim. Diffing with Vim on Windows
                      > works excellently with 'diffexpr=', and I suggest that Steve removes
                      > the setting of 'diffexpr' and the MyDiff() function from the default
                      > _vimrc.
                      >
                      > While we're at it, I also suggest removing 'source $VIMRUNTIME/
                      > mswin.vim'. It might seem that it makes the transition to Vim for
                      > windows users easier, when all it really does is delay the inevitable
                      > 'learn to use Vim the way it was meant to be used' brick wall that
                      > every user has to run into sooner or later. At the very least, there
                      > should be a warning sign on that line, saying that using 'mswin.vim'
                      > changes the default behaviour of Vim, and that it might cause
                      > confusion when asking for help. (Also note that 'mswin.vim' does
                      > 'behave mswin', so that line is redundant anyway.)

                      I suggested years ago that mswin.vim be removed (when still on Vim 6.1
                      [my first Vim], I think, and in any case no later than 6.3) and AFAICT
                      most experienced Vim hands find mswin.vim a nuisance, but IIUC Bram was
                      (and is?) against it. Some people think that making Vim look "more like
                      Notepad" will bring more Windows users to Vim; I think that Vim is Vim,
                      Notepad is Notepad, and whoever tries to mix them up is bound to end up
                      with a self-inflicted shotgun wound in his foot.

                      >
                      > I'd prefer just using 'vimrc_example.vim' as the default _vimrc for
                      > Windows. It contains good defaults, and good comments, and it helps
                      > the user to understand what the _vimrc is. For more opinions, I think
                      > raising the question on vim_use would be a good idea.
                      >
                      > Henrik.
                      >

                      I regard vimrc_example.vim as a good starting point for a vimrc on any
                      platform. My recommendation is to start with a vimrc containing just

                      runtime vimrc_example.vim

                      and then, as time goes by, add more customizations below that (or very
                      rarely above it).


                      Best regards,
                      Tony.
                      --
                      Would you mind terribly much if I asked you to take your silly-assed
                      problem down the hall?

                      --
                      You received this message from the "vim_dev" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                    Your message has been successfully submitted and would be delivered to recipients shortly.