vim 将通过 CLI 打开的文件添加到 :e 历史记录
默认情况下,在 Vim 中,当您输入 :e
并点击向上箭头时,它会显示之前使用 :e
命令打开的文件列表。有没有办法将我通过 vim
In Vim by default when you enter :e
and hit the up arrow, it shows a list of files previously opened using the :e
command. Is there a way to add files that I've opened from the terminal via vim <filename>
to this list as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种可能性:
说明:
将该命令放入您的
vimrc
文件中并尝试。One possibility:
Explanation:
Put that command in your
vimrc
file and try.我不这么认为。
:e
只是浏览您的内容的便捷方式ex 命令的历史记录。它不特定于编辑命令。它就这样发生了
当您键入 ex 命令的开头时,历史记录将为
“过滤”到以相同字符开头的条目。
:args
命令将打印以下列表作为参数给出的文件命令行,并且
:arge
将编辑文件并将其放入参数中列表(如果还没有)。
或者,可以使用
:b
命令输入缓冲区(如果您的缓冲区中仍然有该文件并且想要编辑它。
其中之一可能对您有帮助!
I don't think so. The
:e <up>
is just a convenient way of browsing yourhistory of ex commands. It's not specific to the edit command. It just happens
that when you type the beginning of an ex command, the history will be
"filtered" to the entries which begin with the same characters.
The
:args
command will print the list of files given as arguments inthe command-line, and
:arge
will edit a file and put it in the argumentlist (if isn't already).
Alternatively, the
:b
command can be used to enter a buffer (in caseyou still have the file in a buffer and want to edit it.
One of these might help you!