你如何在vim中重置ftp密码?

oct*_*bus 4 ftp vim

假设我想在vim中访问此远程文件

ftp://amr@steamboy//home/amr/bin/dr_snapshot.py

并且,在提示时,我不小心输入了错误的密码.

如何重置密码?现在我必须退出并重新启动vim.

客户端和服务器都在Linux上.

谢谢.

Fre*_*ihl 5

:help netrw-userpass

Attempts to use ftp will prompt you for a user-id and a password.
These will be saved in global variables |g:netrw_uid| and
|s:netrw_passwd|; subsequent use of ftp will re-use those two strings,
thereby simplifying use of ftp.  However, if you need to use a
different user id and/or password, you'll want to call |NetUserPass()|
first.
Run Code Online (Sandbox Code Playgroud)

即使用:

:call NetUserPass()                     -- prompts for uid and password
Run Code Online (Sandbox Code Playgroud)

PS.

vim带有一个惊人的帮助系统.在这种情况下,我做了 :h ftp,搜索password和第一次点击是这一部分:

该脚本尝试使用内置的Vim函数| inputsecret()|来无形地获取ftp的密码.见| netrw-userpass | 如何在设置密码后更改密码.

它给了netrw-userpass的条目

BTW如果你迷路了,做一个:h <SOME_STRING>并按CTRL-d,vim会显示一个包含该字符串的所有部分的列表......