0

I'm trying to use nvim (or vim) to edit a file on a remote machine from my Ubuntu 20.04 host like this:

$ nvim scp://developer@devvm//home/developer/junk

From what I understand remote editing is handled by the netrw plugin. I installed nvim my Ubuntu machine via snap because the apt-get version is very old. When I start nvim, the netrw plugin is not loaded. The only reference to it that I found was in /snap/nvim/2789/usr/share/nvim/runtime/ and its subdirectories so I added that directory to the 'set runtimepath' command in my ~/.config/nvim/init.vim file. After that, ':help netrw' works but when I try the remote edit it just says:

:!scp -q 'developer@devvm:/home/developer/junk' '/tmp/nvim.developer/gqbnmh/1'
shell returned 1

and I don't see the file contents. I also tried to put the set runtimepath in my ~/.vimrc instead and run /usr/bin/vi but then I get all kinds of "command is not available in this version" errors.

$ which nvim
/snap/bin/nvim
$ nvim -version | head -1
NVIM v0.8.2
$ which vi
/usr/bin/vi
$ vi --version | head -1
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jan 11 2023 23:54:11)

Any help is appreciated.

zephod
  • 11
  • 1

0 Answers0