我把窗户横着分开了。现在我如何回到正常模式,即没有分裂窗口,只有一个窗口,而不取消所有打开的窗口。我有5个,并不想“退出”,只是想从分裂的窗口出去。


当前回答

要关闭所有分割,我通常将光标放在on-ly可见的窗口中,然后执行:,使当前窗口成为on-ly可见窗口。很好的助记方法。


Edit::help:on告诉我这些命令是相同的:

:在 :只有 CTRL-w CTRL-o 是的,CTRL-W o也有同样的效果(正如Nathan回答的那样)。

这四个选项都会关闭除活动窗口外的所有窗口。

其他回答

就像之前说的那样,这样做的方法是按ctrl+w然后o。这将“最大化”当前窗口,同时关闭其他窗口。如果你想“不最大化”它,有一个插件叫ZoomWin。否则,您必须从头重新创建窗口设置。

要关闭所有分割,我通常将光标放在on-ly可见的窗口中,然后执行:,使当前窗口成为on-ly可见窗口。很好的助记方法。


Edit::help:on告诉我这些命令是相同的:

:在 :只有 CTRL-w CTRL-o 是的,CTRL-W o也有同样的效果(正如Nathan回答的那样)。

这四个选项都会关闭除活动窗口外的所有窗口。

关闭除当前窗口外的所有窗口:

CTRL + w, o

也就是说,先按CTRL+w,再按o。

help open -window(搜索" close a window" - / close a window)

:q[uit] close the current window and buffer. If it is the last window it will also exit vim :bd[elete] unload the current buffer and close the current window :qa[all] or :quita[ll] will close all buffers and windows and exit vim (:qa! to force without saving changes) :clo[se] close the current window but keep the buffer open. If there is only one window this command fails :hid[e] hide the buffer in the current window (Read more at :help hidden) :on[ly] close all other windows but leave all buffers open

关闭当前窗口的两个备选选项是ZZ和ZQ,它们将分别保存和不保存对显示缓冲区的更改。