我把窗户横着分开了。现在我如何回到正常模式,即没有分裂窗口,只有一个窗口,而不取消所有打开的窗口。我有5个,并不想“退出”,只是想从分裂的窗口出去。
当前回答
提供窗口号以关闭特定窗口而不保留当前窗口:
:[N]close
:close[N]
:[N]quit
:quit[N]
Ctrl-W[N]c
窗口号可以通过以下设置显示在状态行中:
:set statusline+=%{tabpagewinnr(tabpagenr())}
其他回答
就像之前说的那样,这样做的方法是按ctrl+w然后o。这将“最大化”当前窗口,同时关闭其他窗口。如果你想“不最大化”它,有一个插件叫ZoomWin。否则,您必须从头重新创建窗口设置。
好的,我只是分离并重新连接到屏幕会话,我回到了我想要的正常屏幕
我发现按ctrl + w到你想关闭的窗口,然后只需做:q。这对我很有用。
命令:hide将隐藏当前聚焦的窗口。我认为这就是你想要的功能。
为了在窗口之间导航,键入Ctrl+w后跟一个导航键(h,j,k,l或方向键)
有关更多信息,请运行:help window和:help hide in vim。
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
推荐文章
- 强迫自己掌握vi的最好方法是什么?
- 如何回到行之前编辑的最后一个在Vim?
- 如何跳转到一个特定的人物在vim?
- 如何删除一个大的文本块而不计算行?
- Java中的split()方法对点(.)不起作用。
- 在Vim/Vi中,如何将光标移动到前一个单词的末尾?
- 如何在vim中自动删除尾随空格
- 为什么Vim使用~扩展名保存文件?
- 如何在Vim或Linux中将空格转换为制表符?
- 我如何使用vimdiff来解决git合并冲突?
- 在Vim中删除当前缓冲区的文件名/路径
- Git在终端提交时打开VIM,但无法返回终端
- 请参阅编辑器中的换行符和回车
- 如何在NERDTree中显示隐藏文件(以句点开始)?
- 如何复制一个选择到OS X剪贴板