Please add hotkey for resizing sidebar

Use case or problem

Resizing any sidebar requires reaching for the mouse and finding the 10 pixels of the splitter that allow to drag-to-resize the sidebar. It would be great to do this with the keyboard instead.

Proposed solution

Add a keyboard shortcut to resize (incrementally, bigger/smaller) the active pane (I guess last pane that was focused?)

There’s a shortcut like that in vscode and even though it could be a bit confusing (since it depends on the active pane), it’s a lifesaver for me.

Thanks!

2 Likes

As it happens, this was bothering me so much as well that I just wrote a plugin to take care of this:

It technically does not provide hotkeys, but commands that you can bind to hot keys:

  1. Increase left sidebar width: Increases the left sidebar width by the specified increment.
  2. Decrease left sidebar width: Decreases the left sidebar width by the specified increment.
  3. Increase right sidebar width: Increases the right sidebar width by the specified increment.
  4. Decrease right sidebar width: Decreases the right sidebar width by the specified increment.
  5. Toggle left sidebar (standard width): Toggles the left sidebar between its standard width and zero width.
  6. Toggle right sidebar (standard width): Toggles the right sidebar between its standard width and zero width.
  7. Expand both sidebars to standard widths: Sets both sidebars to their standard widths.
  8. Collapse both sidebars: Collapses both sidebars to zero width.

Increment and standard widths specified in “Settings”, and can be specified either as pixels or percentages.

Right now you have to manually install, but when I have time later today I will submit it for approval for availability through the Obsidian community plugins channel.

1 Like

Anyone knows a plugin or way to do this for the size of side-by-side tabs?

That is, control the default 50%-50% split when to tabs are open side-by-side to something else with keyboard shortcuts?