How to maximize a split in VScode

前提是你 提交于 2019-12-30 07:29:10

问题


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.

thanks


回答1:


From the July 2018 Release Notes: Automated maximize of minimized editors

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.

Or use the command View: Maximize Editor Group.

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

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 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"
}

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.



来源:https://stackoverflow.com/questions/53925724/how-to-maximize-a-split-in-vscode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!