how to reset vscode terminal pane size with keyboard shortcut?

Viewed 867

Question

How can I assign a keybinding to resize the panel to its default height (ie not min/maximized)?

Background

Often I need to resize the terminal to see more output, while still leaving enough of the editor viewable to compare stuff.

Afterward, I want to have a keybinding that restores the panel to a shorter, less-obtrusive height (eg the default height) without fully minimizing it.

The default keybindings show only the following command related to panel resizing, which is not what I want:

// - workbench.action.toggleMaximizedPanel # 

My environment:

Version: 1.59.0 OS: Linux x64

1 Answers

Are you sure you're not looking for "command": "workbench.action.toggleMaximizedPanel"?

If you first open your terminal to an unobtrusive size you can simply use the keybinding you've chosen to toggle between maximized and your chosen default, and not min/maximized as you say.

So, in keybindings.json (Command Palette > "Preferences: Open Keyboard Shortcuts (JSON)"), you can add something like:

{
    "key": "ctrl+shift+m",
    "command": "workbench.action.toggleMaximizedPanel"
}
Related