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

Re: [BUG] vimdiff doesn't work when the arguments are urls

Expand Messages
  • Tony Mechelynck
    ... Recognising URLs is the job of the netrw plugin, which (like all plugins) is only sourced at the end of startup. I think it would work if you started Vim
    Message 1 of 7 , Jan 1, 2011
    • 0 Attachment
      On 31/12/10 18:37, H Xu wrote:
      > Hello,
      >
      > "vimdiff" doesn't work when the arguments are urls. For example,
      > "vimdiff /home/user/a.c /home/user/b.c" works, but "vimdiff
      > file:///home/user/a.c file:///home/user/b.c" doesn't work.
      >
      > Tested under Linux.
      >
      > Regards,
      > Hong Xu
      > 01/01/2011
      >

      Recognising URLs is the job of the netrw plugin, which (like all
      plugins) is only sourced at the end of startup.

      I think it would work if you started Vim empty, then issued the commands

      :e http://server1/path1/subpath1/file1.c
      :vert diffsplit http://server2/path2/subpath2/file2.c

      within the running Vim. (file: URLs can always be simplified to local
      paths, which Vim can then load with no help from netrw.)


      Best regards,
      Tony.
      --
      She missed an invaluable opportunity to give him a look that you could
      have poured on a waffle ...

      --
      You received this message from the "vim_dev" 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
    • Peter Odding
      ... The implication that BufReadCmd automatic commands don t work at start-up is not true. My notes.vim plug-in registers a pseudo protocol (note:) using a
      Message 2 of 7 , Jan 1, 2011
      • 0 Attachment
        > Recognising URLs is the job of the netrw plugin, which (like all
        > plugins) is only sourced at the end of startup.

        The implication that BufReadCmd automatic commands don't work at
        start-up is not true. My notes.vim plug-in registers a "pseudo protocol"
        (note:) using a BufReadCmd* automatic command and this works fine in
        command arguments. In fact using it from the command line was one of my
        main use cases because it enables me to do this:

        $ gvim note:todo

        And I have my to-do list in front of me :-)

        - Peter Odding

        * https://github.com/xolox/vim-notes/blob/master/notes.vim#L60

        --
        You received this message from the "vim_dev" 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
      • Benjamin R. Haskell
        ... There s something more complex afoot here. I regularly use vimdiff against scp://host/ URLs to sync files from my main machine against whatever is on the
        Message 3 of 7 , Jan 2, 2011
        • 0 Attachment
          On Sat, 1 Jan 2011, Tony Mechelynck wrote:

          > On 31/12/10 18:37, H Xu wrote:
          >> Hello,
          >>
          >> "vimdiff" doesn't work when the arguments are urls. For example,
          >> "vimdiff /home/user/a.c /home/user/b.c" works, but "vimdiff
          >> file:///home/user/a.c file:///home/user/b.c" doesn't work.
          >>
          >> Tested under Linux.
          >>
          >> Regards,
          >> Hong Xu
          >> 01/01/2011
          >>
          >
          > Recognising URLs is the job of the netrw plugin, which (like all
          > plugins) is only sourced at the end of startup.

          There's something more complex afoot here. I regularly use vimdiff
          against scp://host/ URLs to sync files from my main machine against
          whatever is on the current machine:

          e.g. to keep my .gitconfig (which contains a section on my main machine
          [for github] that I don't wish to sync on my work machine) I use:

          remote ~$ vimdiff scp://home/.gitconfig ~/.gitconfig

          So, it's not just the fact that it's using netrw. Even two scp:// URLs
          works fine:

          home ~$ cp .vimrc{,.copy}
          remote ~$ vimdiff scp://home/.vimrc{,.copy}

          And both files open fine (via netrw's scp: handling).

          --
          Best,
          Ben

          --
          You received this message from the "vim_dev" 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
        • Ben Fritz
          ... Is vimdiff an alias? Does it use an alternate Vim setup without plugins, etc? -- You received this message from the vim_dev maillist. Do not top-post!
          Message 4 of 7 , Jan 3, 2011
          • 0 Attachment
            On Dec 31 2010, 11:37 am, H Xu <xuh...@...> wrote:
            > Hello,
            >
            > "vimdiff" doesn't work when the arguments are urls. For example,
            > "vimdiff /home/user/a.c /home/user/b.c" works, but "vimdiff
            > file:///home/user/a.c file:///home/user/b.c" doesn't work.
            >

            Is vimdiff an alias? Does it use an alternate Vim setup without
            plugins, etc?

            --
            You received this message from the "vim_dev" 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
          • Charles Campbell
            ... Hello, Please try netrw v141i available from my website (http://mysite.verizon.net/astronaut/vim/index.html#NETRW). HTH, Chip Campbell -- You received this
            Message 5 of 7 , Jan 3, 2011
            • 0 Attachment
              H Xu wrote:
              > Hello,
              >
              > "vimdiff" doesn't work when the arguments are urls. For example,
              > "vimdiff /home/user/a.c /home/user/b.c" works, but "vimdiff
              > file:///home/user/a.c file:///home/user/b.c" doesn't work.
              >
              > Tested under Linux.
              Hello,

              Please try netrw v141i available from my website
              (http://mysite.verizon.net/astronaut/vim/index.html#NETRW).

              HTH,
              Chip Campbell

              --
              You received this message from the "vim_dev" 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
            • H Xu
              ... Hello Charles Campbell, v141i works fine. Thanks! Regards, Hong Xu 01/05/2011 -- You received this message from the vim_dev maillist. Do not top-post!
              Message 6 of 7 , Jan 5, 2011
              • 0 Attachment
                On 01/03/2011 11:51 PM, Charles Campbell wrote:
                > Hello,
                >
                > Please try netrw v141i available from my website
                > (http://mysite.verizon.net/astronaut/vim/index.html#NETRW).
                >
                > HTH,
                > Chip Campbell
                >

                Hello Charles Campbell,

                v141i works fine. Thanks!

                Regards,
                Hong Xu
                01/05/2011

                --
                You received this message from the "vim_dev" 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
              Your message has been successfully submitted and would be delivered to recipients shortly.