如何将所有分割窗口转换为标签窗口?

3
如何将所有分割窗口变成选项卡窗口?
1个回答

4

您可以通过按下 CTRL-W 然后 T 来执行此操作,或者使用:wincmd T

根据文档说明:

                        *CTRL-W_T*
CTRL-W T    Move the current window to a new tab page.  This fails if
        there is only one window in the current tab page.
        When a count is specified the new tab page will be opened
        before the tab page with this index.  Otherwise it comes after
        the current tab page.

请注意,:windo winc T 不起作用,因为 windo 只在同一标签页中有效。但是你可以使用 :windo wincmd T | tabprevious 命令达到相同的效果。(感谢Randy Morris提供的方法)。

不,有三个或更多的窗口被分割了,现在该怎么做才能将它们全部作为选项卡窗口呢?C-W T 只能将当前窗口作为选项卡。 - shibly
3
你可以使用:windo wincmd T | tabp代替这个宏。该命令会将所有窗口移动到新标签页中。 - Randy Morris
@Randy Morris:谢谢,我误读了windo的文档(把can't看成了can)。正在更新答案! - Benoit

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