I am opening a remote file with this command:
[n]vim scp://user@host/relative_file
Vim (8.2) opens the file correctly, but Neovim (v0.5.0-dev+1186-g8665a96b9) just shows a blank file and a blank NetrwMessage buffer. When I try to open it again with :e
in Neovim, an error is printed:
Error detected while processing function netrw#Nread[4]..netrw#NetRead:
line 261:
E121: Undefined variable: b:netrw_method
E116: Invalid arguments for function s:NetrwGetFile
E15: Invalid expression: s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
Seems the problem of b:netrw_method
but I can't find useful information about it on the Internet. How to solve this error?
Extra Info
If I use :w
to write, the remote file is successfully overwritten by an empty file.
I am on a Windows machine.
b:netrw_method
is already defined and set to 4 (autoload/netrw.vim:2241
).