Problems with netrw scp

2007-05-17 Thread David Rennalls

Hi,
  I'm having some trouble getting netrw v109(vim 7.1 win WinXP)
working with scp.

:Nread scp://[EMAIL PROTECTED]:/etc/hosts
..results in the following errors.
**warning** (netrw) unable to comply with your
requestscp://[EMAIL PROTECTED]:/etc/hosts
Enclosing the URL with double quotes makes no difference either.

:messages
NetrwMessage  --No lines in buffer--
Error detected while processing function netrw#NetRead:
line   91:
E121: Undefined variable: b:netrw_fname
E116: Invalid arguments for function s:GetTempfile(b:netrw_fname) 
apply correct suffix
E15: Invalid expression: s:GetTempfile(b:netrw_fname)  apply correct suffix
line  360:
E108: No such variable: b:netrw_fname

I get the same error no matter what g:netrw_scp_cmd is set to. There's
no command window popping up when the Nread is done so I don't think
it's even attempting to run the scp executable (which is pscp in my
case).

Any suggestions ?

- David


Re: Problems with netrw scp

2007-05-17 Thread Charles E Campbell Jr

David Rennalls wrote:


Hi,
  I'm having some trouble getting netrw v109(vim 7.1 win WinXP)
working with scp.

:Nread scp://[EMAIL PROTECTED]:/etc/hosts
..results in the following errors.
**warning** (netrw) unable to comply with your
requestscp://[EMAIL PROTECTED]:/etc/hosts
Enclosing the URL with double quotes makes no difference either.

:messages
NetrwMessage  --No lines in buffer--
Error detected while processing function netrw#NetRead:
line   91:
E121: Undefined variable: b:netrw_fname
E116: Invalid arguments for function s:GetTempfile(b:netrw_fname) 
apply correct suffix
E15: Invalid expression: s:GetTempfile(b:netrw_fname)  apply correct 
suffix

line  360:
E108: No such variable: b:netrw_fname

I get the same error no matter what g:netrw_scp_cmd is set to. There's
no command window popping up when the Nread is done so I don't think
it's even attempting to run the scp executable (which is pscp in my
case).


Here's some pointers:

* Did you know that you don't need to use :Nread?  Just  :r ... would be 
fine.


* Drop the second colon from scp://[EMAIL PROTECTED]:/etc/hosts
  AND I suspect you want /etc/hosts, not /root/etc/hosts (/root 
generally acts as the

  home directory for root), so try using:

  scp://[EMAIL PROTECTED]//etc/hosts

* Did you read   :help netrw-pscp,  :help netrw-p8  for how to set netrw 
up to use pscp?


Regards,
Chip Campbell



Re: Problems with netrw scp

2007-05-17 Thread David Rennalls

On 5/17/07, Charles E Campbell Jr [EMAIL PROTECTED] wrote:

Here's some pointers:

* Did you know that you don't need to use :Nread?  Just  :r ... would be
fine.


no I didn't. Thanks.


* Drop the second colon from scp://[EMAIL PROTECTED]:/etc/hosts
   AND I suspect you want /etc/hosts, not /root/etc/hosts (/root


you're right.. I did want /etc/hosts that's why I didn't put
~/etc/hosts (/root/etc/hosts) :) I was thinking of the usual scp path
syntax.


generally acts as the
   home directory for root), so try using:

   scp://[EMAIL PROTECTED]//etc/hosts

* Did you read   :help netrw-pscp,  :help netrw-p8  for how to set netrw
up to use pscp?


yes, like I said I had set g:netrw_scp_cmd. I missed the lack of a
colon in the netrw-ref section though, assuming that the normal scp
syntax would work.

After getting rid of the colon *and* getting rid of the double-quotes
it works (for :r at least).
:r doesn't work with the quotes (E32: no file name), :Nread does.

Thanks,
   David