1

I'm trying to use my MobaXTerm vim to access a remote file using netrw as follows:

vim scp://my_username@my_server//path/file.txt

I have password-less login set up (through .ssh / rsa_id, etc.).

This works fine from my OS X machine running vim 7.3, but not from MobaXTerm vim (also 7.3).

Does MobaXTerm's vim support netrw?

  • Have you already read :h netrw-ssh-hack? – Rich Feb 5 '16 at 16:20
  • 1
    @Rich I have not -- actually, when I try to use :help at all in MobaXTerm vim, I get E433: No tags file :/ – Chris Gregg Feb 5 '16 at 17:26
  • Ah. Here you go, then: vimhelp.appspot.com/pi_netrw.txt.html#netrw-ssh-hack I'd suggest trying to get it working with a password first, and then having a go at that. I guess check scp works in MobaXTerm outside of Vim, too. – Rich Feb 5 '16 at 17:49
  • @Rich Thanks for the link! I'll see what I can figure out. I also need to figure out why there isn't any /usr/share/vim/doc folder (where the help file would live). I should add: scp works fine from the MobaXTerm terminal. – Chris Gregg Feb 5 '16 at 17:52
1

A couple of things to consider:

  • what is your g:netrw_scp_cmd?
  • you may need to give a full path to your system's scp
  • Hmm -- g:netrw_scp_cmd isn't set. Tried the full scp path (/bin/scp) but it simply tried to open a new file on my local system (as it did with scp alone) – Chris Gregg Feb 12 '16 at 3:31
  • The g:netrw_scp_cmd should be set after you've opened a netrw buffer, or if you've set it in your .vimrc. Another thing: try :help netrw-debug and get a trace of what's actually happening. – user21497 Feb 15 '16 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.