如何在Vim中的FTP服务器上切换到其他目录?

如何在Vim中的FTP服务器上切换到其他目录?,vim,ftp,netrw,Vim,Ftp,Netrw,Vim有一个奇特的NetRW插件,可以让我输入 vim ftp://ftp.example.com/ 并得到一个很好的目录列表,我可以编辑文件,只需按下CR,同时在上面 然而,我似乎无法对目录执行此操作。在按F1键时显示的帮助文件中,它显示我应该能够: BROWSING netrw-cr {{{2 Browsing is simple: move the cursor onto a file or

Vim有一个奇特的NetRW插件,可以让我输入

vim ftp://ftp.example.com/
并得到一个很好的目录列表,我可以编辑文件,只需按下CR,同时在上面

然而,我似乎无法对目录执行此操作。在按F1键时显示的帮助文件中,它显示我应该能够:

BROWSING                                                netrw-cr {{{2

Browsing is simple: move the cursor onto a file or directory of interest.
Hitting the <cr> (the return key) will select the file or directory.
Directories will themselves be listed, and files will be opened using the
protocol given in the original read request.
Vim尝试访问
ftp://ftp.example.com/somedirectory
。请注意,它没有添加表示它是目录的斜杠

我不知道为什么会发生这种情况。我如何在Vim中简单地进入该目录,而不必退出Vim并重新键入
Vimftp://ftp.example.com/somedirectory/


我正在Ubuntu 14.04上运行Vim 7.4。

Vim似乎不知道我的目录实际上是一个目录,因为在目录列表中,它后面没有显示
/
符号

幸运的是,我找到了一种方法,可以强制NetRW像文件是目录一样工作:
gd

FORCING TREATMENT AS A FILE OR DIRECTORY        netrw-gd netrw-gf {{{2

Remote symbolic links (ie. those listed via ssh or ftp) are problematic
in that it is difficult to tell whether they link to a file or to a
directory.

To force treatment as a file: use
        gf

To force treatment as a directory: use
        gd
因此,只需按
gd
而不是
即可切换到光标下的目录

我仍然不知道为什么NetRW认为我的目录是一个文件。帮助信息只说了“远程符号链接”,我想不是。这可能与我的web主机(iPage)有关,它可能到处使用符号链接,而不是实际的目录。或者是我这边出了什么事

FORCING TREATMENT AS A FILE OR DIRECTORY        netrw-gd netrw-gf {{{2

Remote symbolic links (ie. those listed via ssh or ftp) are problematic
in that it is difficult to tell whether they link to a file or to a
directory.

To force treatment as a file: use
        gf

To force treatment as a directory: use
        gd