微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何回到上一个打开的文件在Vim?

参见英文答案 > How do you return from ‘gf’ in Vim11个答案我可以使用gf去的名称下/光标后的文件,有没有任何命令回到原始文件,而不重新启动vim打开它?
尝试使用此快捷方式:
CTRL-^

Vim文档:help CTRL- ^:

06001

和:帮助备用文件

If there already was a current file name,then that one becomes the alternate file name. It can be used with “#” on the command line |:_#| and you can use the |CTRL-^| command to toggle between the current and the alternate file. However,the alternate file name is not changed when |:keepalt| is used. An alternate file name is remembered for each window.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐