使用vim命令将文件加载到缓冲区时,:o和:e有什么区别?

4

我正在观看一个由tutsplus提供的在线教程,其中一堂课中,老师开始使用:bn :bn :b#在不同的缓冲区之间切换,但是他忘了在讲解如何在不同的缓冲区之间切换前说明如何将文件加载到缓冲区中。我搜索并发现可以使用:e filename或:o filename将文件加载到缓冲区中。

那么,它们有什么区别呢?我无法理解vim文档中提供的解释。

1个回答

9
区别在于您不应该使用:o,这是vi兼容性的无用产物,而应该改用:e(或其替代命令之一)。
:help :o
Vim does not support open mode, since it's not really useful.  For those
situations where ":open" would start open mode Vim will leave Ex mode, which
allows executing the same commands, but updates the whole screen instead of
only one line.

就算存在这个命令,也请忘记它。

顺便说一句,即使vi规范对于打开模式(open mode)的定义也非常模糊。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接