如何在 VScode 中最大化拆分 [英] How to maximize a split in VScode

查看:75
本文介绍了如何在 VScode 中最大化拆分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢 VScode 中的拆分视图模式,但我无法弄清楚的一件事是暂时最大化拆分视图.

I like the split view mode in VScode but one thing I cant figure out is to maximize a split view temporarily.

我希望能够暂时最大化拆分窗口(如拆分窗口中的一个),然后在完成后恢复布局.

I would like to be able to maximize a split window (as in on one the windows of a split) for a moment and then restore the layout when I am done with it.

谢谢

推荐答案

来自 2018 年 7 月发行说明:最小化编辑器的自动最大化

要使其工作,您必须首先手动最小化一个拆分(或编辑器组中的编辑器).

To get this to work you have to first manually minimize one of the splits (or editors in an editor group).

尽可能向左(或向右)拖动编辑器之间的分隔栏.

Drag the separator bar between the editors as far left (or right) as it will go.

或者使用命令View: Maximize Editor Group.

然后单击或以其他方式聚焦(可能使用 workbench.action.focusLeftGroup 或类似方法)另一个拆分将最大化它.

Then clicking in or otherwise focussing (perhaps with workbench.action.focusLeftGroup or similar) the other split will maximize it.

注意:您始终可以通过 View: Maximize Editor Group (workbench.action.minimizeOtherEditors) 最大化活动编辑器或通过 View: Reset Editor Group Sizes (workbench.action.evenEditorWidths).

Note: You can always maximize the active editor via View: Maximize Editor Group (workbench.action.minimizeOtherEditors) or reset all editor sizes via View: Reset Editor Group Sizes (workbench.action.evenEditorWidths).

EDIT:v1.38 有一个新命令:

EDIT: v1.38 has a new command:

workbench.action.toggleEditorWidths

这在这里很有用.默认情况下,它未绑定到键绑定.假设你像这样绑定它:

which can be useful here. It is unbound to a keybinding by default. Say you bind it like so:

{
    "key": "ctrl+alt+b",
    "command": "workbench.action.toggleEditorWidths"
}

然后使用它一次来最大化一个分割——之后将焦点切换到任一分割将很容易地最大化那个分割.基本上,使用 workbench.action.toggleEditorWidths 命令一次即可完成手动拖动分隔栏的工作.

Then use it once to maximize one of the splits - after that switching focus to either one will maximize that one easily. Basically, using the workbench.action.toggleEditorWidths command once will do the work of manually dragging the separator bar for you.

这篇关于如何在 VScode 中最大化拆分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆