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

Problem doing diffs using win 2000

Expand Messages
  • Wolfgang Schmidt
    Hi, I just installed gvim70 (from the self-extracting exe) on WIN 2K system. Everything seems to work, exept the diff functionality. If I do a diff, e.g.
    Message 1 of 15 , Jun 30, 2006
    • 0 Attachment
      Hi,

      I just installed gvim70 (from the self-extracting exe) on WIN 2K system.
      Everything seems to work, exept the diff functionality.
      If I do a diff, e.g.

      C:\Programme\Vim>vim _vimrc -d _vimrc.bak

      I get

      2 Dateien zum Editieren
      Das angegebene Programm kann nicht ausgeführt werden.

      E97: Kann keine Differenz erstellen

      so Vim complains, that the diff program can't be executed. But the diff
      program is present (C:\Programme\Vim\vim70\diff.exe) and it works (I
      tried it manually from the commandline).

      Maybe there's a problem with diff under win2K? I've used the same
      installer executable to install gvim70 on some Win XP machines, and I
      did not have any problems with diff.

      Thanx in advance

      Wolfgang
    • Wim R. Crols
      Hi, Not really a request for help, but I was wondering if you guys ever use the s command. It s just a shortcut for cl , which I almost never need. Since I
      Message 2 of 15 , Jun 30, 2006
      • 0 Attachment
        Hi,

        Not really a request for help, but I was wondering if you guys ever use
        the 's' command.
        It's just a shortcut for 'cl', which I almost never need. Since I don't
        assume it was put in to be complete or something, I'm intrigued by it's
        enigmatic purpose. :)

        Thanks,
        Wim
      • Tim Chase
        ... I ll admit that it took me a while (several years) to add it to my repertoire of actively used vim commands. I do use it these days, as it *does* cut off
        Message 3 of 15 , Jun 30, 2006
        • 0 Attachment
          > Not really a request for help, but I was wondering if you guys ever use
          > the 's' command.
          > It's just a shortcut for 'cl', which I almost never need. Since I don't
          > assume it was put in to be complete or something, I'm intrigued by it's
          > enigmatic purpose. :)

          I'll admit that it took me a while (several years) to add it to
          my repertoire of actively used vim commands. I do use it these
          days, as it *does* cut off that extra keystroke. And, yes, I'm
          that lazy. :)

          Most often, I end up using it ("s") when I need to alter the end
          of a word, such as removing a terminal ess or removing some
          punctuation and continuing editing from there. Tangentially, I
          still can't say I use "S", as I find "cc" much easier...both to
          remember and to type.

          Just one perspective on the matter...

          -tim
        • Peter Slizik
          ... Well, I use it when I want to replace a word that is for example 4 letters long. abcd efgh ijkl Suppose I want to replace efgh with something else. I
          Message 4 of 15 , Jun 30, 2006
          • 0 Attachment
            > Not really a request for help, but I was wondering if you guys ever use
            > the 's' command.
            > It's just a shortcut for 'cl', which I almost never need. Since I don't
            > assume it was put in to be complete or something, I'm intrigued by it's
            > enigmatic purpose. :)

            Well, I use it when I want to replace a word that is for example 4 letters
            long.

            abcd efgh ijkl

            Suppose I want to replace "efgh" with something else. I place the cursor at
            the beginning of the word and type '4s'. The word disappears and ViM switches
            to the insert mode.

            -- Peter
          • Wim R. Crols
            ... Yes, I figured out that use, but isn t cw always easier since you don t have to count? And when you need to only replace part, like replacing abcd in
            Message 5 of 15 , Jun 30, 2006
            • 0 Attachment
              Peter Slizik wrote:
              >> Not really a request for help, but I was wondering if you guys ever use
              >> the 's' command.
              >> It's just a shortcut for 'cl', which I almost never need. Since I don't
              >> assume it was put in to be complete or something, I'm intrigued by it's
              >> enigmatic purpose. :)
              >>
              >
              > Well, I use it when I want to replace a word that is for example 4 letters
              > long.
              >
              > abcd efgh ijkl
              >
              > Suppose I want to replace "efgh" with something else. I place the cursor at
              > the beginning of the word and type '4s'. The word disappears and ViM switches
              > to the insert mode.
              >
              > -- Peter
              >
              Yes, I figured out that use, but isn't 'cw' always easier since you
              don't have to count? And when you need to only replace part, like
              replacing "abcd" in "abcdef", then I'd rather use 'cfd'.
              Just my 2c of course.

              Wim
            • Michael Naumann
              ... cfd may be quite different from 4s in this example, esp. if you intend to repeat the replacement on other places with . . - Michael
              Message 6 of 15 , Jun 30, 2006
              • 0 Attachment
                On Friday 30 June 2006 15:16, Wim R. Crols wrote:
                > Peter Slizik wrote:
                > >> Not really a request for help, but I was wondering if you guys ever use
                > >> the 's' command.
                > >> It's just a shortcut for 'cl', which I almost never need. Since I don't
                > >> assume it was put in to be complete or something, I'm intrigued by it's
                > >> enigmatic purpose. :)
                > >>
                > >
                > > Well, I use it when I want to replace a word that is for example 4 letters
                > > long.
                > >
                > > abcd efgh ijkl
                > >
                > > Suppose I want to replace "efgh" with something else. I place the cursor at
                > > the beginning of the word and type '4s'. The word disappears and ViM switches
                > > to the insert mode.
                > >
                > > -- Peter
                > >
                > Yes, I figured out that use, but isn't 'cw' always easier since you
                > don't have to count? And when you need to only replace part, like
                > replacing "abcd" in "abcdef", then I'd rather use 'cfd'.
                > Just my 2c of course.
                >
                > Wim
                >
                >
                cfd may be quite different from 4s in this example, esp. if you intend
                to repeat the replacement on other places with ".".

                - Michael
              • Gene Kwiecinski
                ... All the time... ... Comes in handy when you re replacing text that s of a different length. Eg, if you have the word intended and want to change it to
                Message 7 of 15 , Jun 30, 2006
                • 0 Attachment
                  >Not really a request for help, but I was wondering if you guys ever use
                  >the 's' command.

                  All the time...


                  >It's just a shortcut for 'cl', which I almost never need. Since I don't
                  >assume it was put in to be complete or something, I'm intrigued by it's
                  >enigmatic purpose. :)

                  Comes in handy when you're replacing text that's of a different length.
                  Eg, if you have the word "intended" and want to change it to
                  "intending", you'd 'fe;' or '/ed' to get to the 2nd 'e', then '2sing' to
                  get what you want. Otherwise, you'd have to do something like '2xaing',
                  etc.

                  In the instant case, 'cwing' would work, too, but if the text is in the
                  middle of a word, or you're replacing characters in a filename,
                  whatever, 's' comes in handy as a "delete this char / these chars, and
                  replace it with as many chars as you want" command.

                  Oh, to fix misspellings, too. Hard to give a "good" example right off,
                  but once you start using 's', believe me, it comes in *really* handy.

                  All those keystrokes add up, so why wear out your keyboard prematurely?
                • Eric Arnold
                  I can t remember why or when (it was so long ago), but I ve always used s and S in vi . It never really occured to me to use cl instead. It was just
                  Message 8 of 15 , Jun 30, 2006
                  • 0 Attachment
                    I can't remember why or when (it was so long ago), but I've always
                    used 's' and 'S' in 'vi'. It never really occured to me to use 'cl'
                    instead. It was just another command in the list.

                    It was part of the original 'vi', but I'm not sure if you meant that
                    by 'put in to be complete'.

                    It is no more enigmatic then a lot of things in 'vi' which are there
                    just to make editing incrementally better. There's 'C' vs 'c$', 'D',
                    'G', 'Y', etc., all of which are redundant with combinations of other
                    commands.


                    On 6/30/06, Wim R. Crols <wim@...> wrote:
                    > Hi,
                    >
                    > Not really a request for help, but I was wondering if you guys ever use
                    > the 's' command.
                    > It's just a shortcut for 'cl', which I almost never need. Since I don't
                    > assume it was put in to be complete or something, I'm intrigued by it's
                    > enigmatic purpose. :)
                    >
                    > Thanks,
                    > Wim
                    >
                  • Russell Bateman
                    Hehehe, if the expense of a keyboard were anywhere near the top of the list of my concerns, life would be grand indeed! Best, Russ
                    Message 9 of 15 , Jun 30, 2006
                    • 0 Attachment
                      Hehehe, if the expense of a keyboard were anywhere near the top of the
                      list of my concerns, life would be grand indeed!

                      Best,

                      Russ

                      Gene Kwiecinski wrote:
                      > [snip]
                      >
                      > All those keystrokes add up, so why wear out your keyboard prematurely?
                    • Yegappan Lakshmanan
                      Hello, ... Do you have the diffexpr set in your .vimrc file? ... - Yegappan
                      Message 10 of 15 , Jun 30, 2006
                      • 0 Attachment
                        Hello,

                        On 6/30/06, Wolfgang Schmidt <hak@...> wrote:
                        >
                        > Hi,
                        >
                        > I just installed gvim70 (from the self-extracting exe) on WIN 2K system.
                        > Everything seems to work, exept the diff functionality.
                        > If I do a diff, e.g.
                        >
                        > C:\Programme\Vim>vim _vimrc -d _vimrc.bak
                        >
                        > I get
                        >
                        > 2 Dateien zum Editieren
                        > Das angegebene Programm kann nicht ausgeführt werden.
                        >
                        > E97: Kann keine Differenz erstellen
                        >
                        > so Vim complains, that the diff program can't be executed. But the diff
                        > program is present (C:\Programme\Vim\vim70\diff.exe) and it works (I
                        > tried it manually from the commandline).
                        >
                        > Maybe there's a problem with diff under win2K? I've used the same
                        > installer executable to install gvim70 on some Win XP machines, and I
                        > did not have any problems with diff.
                        >

                        Do you have the 'diffexpr' set in your .vimrc file?

                        :verbose set diffexpr?

                        - Yegappan
                      • Wolfgang Schmidt
                        ... Hi, yes, it s set to MyDiff(), which is defined in _vimrc as set diffexpr=MyDiff() function MyDiff() let opt = -a --binary if &diffopt =~ icase | let
                        Message 11 of 15 , Jul 3, 2006
                        • 0 Attachment
                          Yegappan Lakshmanan wrote:
                          > Do you have the 'diffexpr' set in your .vimrc file?
                          >
                          > :verbose set diffexpr?
                          >
                          > - Yegappan
                          Hi,

                          yes, it's set to MyDiff(), which is defined in _vimrc as

                          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
                          silent execute '!C:\Programme\Vim\vim70\diff ' . opt . arg1 . ' ' .
                          arg2 . ' > ' . arg3
                          endfunction

                          This work's fine for WinXP, but not for Win2k

                          Cheers,

                          Wolfgang
                        • Wim R. Crols
                          Thanks for all the explanations everyone. I do see your points, and will try to add s to my weaponry :) Wim
                          Message 12 of 15 , Jul 3, 2006
                          • 0 Attachment
                            Thanks for all the explanations everyone. I do see your points, and will
                            try to add 's' to my weaponry :)

                            Wim
                            >
                            >
                            > On 6/30/06, Wim R. Crols <wim@...> wrote:
                            >> Hi,
                            >>
                            >> Not really a request for help, but I was wondering if you guys ever use
                            >> the 's' command.
                            >> It's just a shortcut for 'cl', which I almost never need. Since I don't
                            >> assume it was put in to be complete or something, I'm intrigued by it's
                            >> enigmatic purpose. :)
                            >>
                            >> Thanks,
                            >> Wim
                            >>
                          • Wolfgang Schmidt
                            Hi, after re-examination of the problem I found the diff functionaliy now working on Win2k, still don t know what caused the problem. Anyway, diff ing does
                            Message 13 of 15 , Jul 3, 2006
                            • 0 Attachment
                              Hi,

                              after re-examination of the problem I found the diff functionaliy now
                              working on Win2k, still don't know what caused the problem.
                              Anyway, diff'ing does work under Win2k, sorry for the confusion and
                              thanks to those who tried to help.

                              Sorry,

                              Wolfgang

                              Wolfgang Schmidt wrote:
                              >
                              > Hi,
                              >
                              > I just installed gvim70 (from the self-extracting exe) on WIN 2K
                              > system. Everything seems to work, exept the diff functionality.
                              > If I do a diff, e.g.
                              >
                              > C:\Programme\Vim>vim _vimrc -d _vimrc.bak
                              >
                              > I get
                              >
                              > 2 Dateien zum Editieren
                              > Das angegebene Programm kann nicht ausgeführt werden.
                              >
                              > E97: Kann keine Differenz erstellen
                              >
                              > so Vim complains, that the diff program can't be executed. But the
                              > diff program is present (C:\Programme\Vim\vim70\diff.exe) and it works
                              > (I tried it manually from the commandline).
                              >
                              > Maybe there's a problem with diff under win2K? I've used the same
                              > installer executable to install gvim70 on some Win XP machines, and I
                              > did not have any problems with diff.
                              >
                              > Thanx in advance
                              >
                              > Wolfgang
                            • A.J.Mechelynck
                              ... The following are wild guesses only: 1. Have you tried placing the -d option in front, as in C: gvim -d _vimrc _vimrc.bak ? 2. Is your vim/vim70
                              Message 14 of 15 , Jul 14, 2006
                              • 0 Attachment
                                Wolfgang Schmidt wrote:
                                >
                                > Hi,
                                >
                                > I just installed gvim70 (from the self-extracting exe) on WIN 2K system.
                                > Everything seems to work, exept the diff functionality.
                                > If I do a diff, e.g.
                                >
                                > C:\Programme\Vim>vim _vimrc -d _vimrc.bak
                                >
                                > I get
                                >
                                > 2 Dateien zum Editieren
                                > Das angegebene Programm kann nicht ausgeführt werden.
                                >
                                > E97: Kann keine Differenz erstellen
                                >
                                > so Vim complains, that the diff program can't be executed. But the diff
                                > program is present (C:\Programme\Vim\vim70\diff.exe) and it works (I
                                > tried it manually from the commandline).
                                >
                                > Maybe there's a problem with diff under win2K? I've used the same
                                > installer executable to install gvim70 on some Win XP machines, and I
                                > did not have any problems with diff.
                                >
                                > Thanx in advance
                                >
                                > Wolfgang
                                >
                                >
                                >


                                The following are wild guesses only:

                                1. Have you tried placing the -d option in front, as in

                                C:\> gvim -d _vimrc _vimrc.bak

                                ?

                                2. Is your vim/vim70 directory part of your PATH ?

                                (Both untested.)


                                Best regards,
                                Tony.
                              • A.J.Mechelynck
                                ... There are a number of such aliases whose sole function is to appeal to the lazy typist: :x for :wq x for dl (all of this without the quotes of
                                Message 15 of 15 , Jul 14, 2006
                                • 0 Attachment
                                  Wim R. Crols wrote:
                                  > Hi,
                                  >
                                  > Not really a request for help, but I was wondering if you guys ever use
                                  > the 's' command.
                                  > It's just a shortcut for 'cl', which I almost never need. Since I don't
                                  > assume it was put in to be complete or something, I'm intrigued by it's
                                  > enigmatic purpose. :)
                                  >
                                  > Thanks,
                                  > Wim
                                  >
                                  >

                                  There are a number of such "aliases" whose sole function is to appeal to
                                  the lazy typist:

                                  ":x" for ":wq"
                                  "x" for "dl"

                                  (all of this without the quotes of course).

                                  Since I profess that laziness is the mother of invention, and since I'm
                                  lazy myself in a workaholic kind of way, the existence of such aliases
                                  (or of the possibility to create shortcuts for almost anything using
                                  ":map", ":abbrev" and friends) doesn't bother me.


                                  Best regards,
                                  Tony.
                                Your message has been successfully submitted and would be delivered to recipients shortly.