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

--remote diff to tab

Expand Messages
  • Hugo Ahlenius
    Hi, I am trying to set up my subversion client(s) so that I can get any diffs open in a proper diff mode, in an existing gvim session, in a new tab... Any tips
    Message 1 of 6 , Nov 1, 2006
      Hi,

      I am trying to set up my subversion client(s) so that I can get any diffs
      open in a proper diff mode, in an existing gvim session, in a new tab...

      Any tips for that? Do you I have to construct a more complicated
      command-line for that -- I just tried:

      --remote-tab -d %1 %2

      but that opened each file in a separate tab...

      Any tips? This is gvim 7 on win xp, btw

      Cheers and thanks!

      /Hugo


      --
      Hugo Ahlenius
      fraxinus (at) oxel.net
      http://www.oxel.net
    • A. S. Budden
      ... I don t know how to do exactly what you ask, but have you seen vcscommand.vim? http://www.vim.org/scripts/script.php?script_id=90 It has a VCSVimDiff
      Message 2 of 6 , Nov 1, 2006
        On 01/11/06, Hugo Ahlenius <fraxinus@...> wrote:
        > Hi,
        >
        > I am trying to set up my subversion client(s) so that I can get any diffs
        > open in a proper diff mode, in an existing gvim session, in a new tab...
        >
        > Any tips for that? Do you I have to construct a more complicated
        > command-line for that -- I just tried:
        >
        > --remote-tab -d %1 %2
        >
        > but that opened each file in a separate tab...
        >
        > Any tips? This is gvim 7 on win xp, btw

        I don't know how to do exactly what you ask, but have you seen vcscommand.vim?

        http://www.vim.org/scripts/script.php?script_id=90

        It has a VCSVimDiff command that will use the svn client to get a diff
        and then show the result as a vimdiff.

        Hope that helps,

        Al
      • Hugo Ahlenius
        ... Hi Al, I have that, and that is what I would use from within vim - but there are times when I would like to have things open from external tools, like my
        Message 3 of 6 , Nov 2, 2006
          | I don't know how to do exactly what you ask, but have you seen
          | vcscommand.vim?
          |
          | http://www.vim.org/scripts/script.php?script_id=90
          |
          | It has a VCSVimDiff command that will use the svn client to get a diff
          | and then show the result as a vimdiff.

          Hi Al, I have that, and that is what I would use from within vim - but there
          are times when I would like to have things open from external tools, like my
          svn browser (or my cvs manager). There are other cases as well.

          Thanks anyways, I am sure someone else would have use for that tip.

          /H.
        • Benji Fisher
          ... Did you try (untested by me) --remote-tab + diffsplit %2 %1 (Will the %2 need any special escaping inside the quotes? What if %2 has spaces in the file
          Message 4 of 6 , Nov 2, 2006
            On Wed, Nov 01, 2006 at 02:15:53PM +0100, Hugo Ahlenius wrote:
            > Hi,
            >
            > I am trying to set up my subversion client(s) so that I can get any diffs
            > open in a proper diff mode, in an existing gvim session, in a new tab...
            >
            > Any tips for that? Do you I have to construct a more complicated
            > command-line for that -- I just tried:
            >
            > --remote-tab -d %1 %2
            >
            > but that opened each file in a separate tab...

            Did you try (untested by me)

            --remote-tab +"diffsplit %2" %1

            (Will the %2 need any special escaping inside the quotes? What if %2
            has spaces in the file name (ugh)?)

            On Thu, Nov 02, 2006 at 09:20:42AM +0100, Hugo Ahlenius wrote:
            > | I don't know how to do exactly what you ask, but have you seen
            > | vcscommand.vim?
            > |
            > | http://www.vim.org/scripts/script.php?script_id=90
            > |
            > | It has a VCSVimDiff command that will use the svn client to get a diff
            > | and then show the result as a vimdiff.
            >
            > Hi Al, I have that, and that is what I would use from within vim - but there
            > are times when I would like to have things open from external tools, like my
            > svn browser (or my cvs manager). There are other cases as well.

            Have you tried something like

            --remote-tab +VCSVimDiff %1

            yet? I do not use this, so I have no idea what the syntax of the
            :VCSVimDiff command is.

            HTH --Benji Fisher
          • Hugo Ahlenius
            ... Thanks Benji, that is on the right track. Maybe I have to call a script that does what I want to do. This works, but as you mentioned, it has a problem
            Message 5 of 6 , Nov 5, 2006
              |> I am trying to set up my subversion client(s) so that I can get any
              |> diffs open in a proper diff mode, in an existing gvim
              |session, in a new tab...
              |
              | Did you try (untested by me)
              |
              |--remote-tab +"diffsplit %2" %1
              |
              |(Will the %2 need any special escaping inside the quotes?
              |What if %2 has spaces in the file name (ugh)?)

              Thanks Benji, that is on the right track. Maybe I have to call a script that
              does what I want to do. This works, but as you mentioned, it has a problem
              with paths/files that has spaces in them. I try to avoid that, but it is
              known to happen now and then...

              /Hugo
            • Hugo Ahlenius
              ... For the record, thanks to Benji Fisher, who got me on the right track. I was able to set up a gvimdiff.bat file that gets called with two (possibly quoted)
              Message 6 of 6 , Nov 16, 2006
                | |> I am trying to set up my subversion client(s) so that I
                | can get any
                | |> diffs open in a proper diff mode, in an existing gvim
                | |session, in a new tab...
                | |
                | | Did you try (untested by me)
                | |
                | |--remote-tab +"diffsplit %2" %1
                | |
                | |(Will the %2 need any special escaping inside the quotes?
                | |What if %2 has spaces in the file name (ugh)?)

                For the record, thanks to Benji Fisher, who got me on the right track. I was
                able to set up a gvimdiff.bat file that gets called with two (possibly
                quoted) files as arguments, and then it executes this:

                gvim.exe --remote-tab +"diffsplit %~2" "%~1"

                Seems to work fine with spaces in the filenames. The tilde in the argument
                specification is a Windows NT command extensions thing, that works on WinNT,
                Win2k + XP (And I assume Vista) - it un-quotes the file arguments.

                Thanks all!

                /Hugo
              Your message has been successfully submitted and would be delivered to recipients shortly.