4

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

mkk
  • 879
  • 6
  • 19

1 Answers1

1

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"
}
Mallory-Erik
  • 1,750
  • 1
  • 19
  • 24
  • 1
    hi, yeah I was just looking for a way to 'reset' the un-maximized (but not hidden) size without touching the mouse. in practice, the easiest solution was to just alter my behavior. i just avoid dragging the default any higher and forgo the 'big terminal / little editor' view. – mkk Aug 31 '21 at 21:11