在 vi/vim 中从选项卡切换到拆分窗口? [英] Switching from tab to splitted window in vi/vim?
问题描述
我们可以使用 :tabnew
创建新标签.我们可以使用 :vs
或 :sp
来分割窗口.
We can make new tab using :tabnew
.
We can split window using :vs
or :sp
.
有时我想从选项卡切换到拆分窗口以比较我的代码或切换回来以获得更多空间.现在我通过关闭它然后使用另一个命令来完成它.有没有更简单的方法?
Sometimes I want to switch from tab to splitted window to compare my code or switch back to get more space. Now I do it by closing it then use another command. Is there any easier way?
谢谢.
推荐答案
在 Vim 中将窗口从一个位置移动/复制到另一个位置(拆分、标签页)的最简单方法(使用内置方法)是使用当前窗口的缓冲区编号(可以放入'statusline'
,或者:ls
会告诉你),例如如:
The easiest way (with built-in means) to move / copy a window from one location to another (split, tab page) within Vim is to use the current window's buffer number (which can be put into the 'statusline'
, or :ls
will tell you), e.g. as in:
:sb[uffer] 3
要在单独的选项卡中打开当前窗口,您可以使用:
To open the current window in a separate tab, you can use:
:tab split
这篇关于在 vi/vim 中从选项卡切换到拆分窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!