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

Raspunde prin e-mail lui