Reputation: 4804
Is there a quick keyboard shortcut to control the width of the current split pane, at least increasing and decreasing it?
for vim users it would be:
:vertical resize 80
:res +5
:res -5
:vertical resize +5
:vertical resize -5
and so on...
Upvotes: 25
Views: 16441
Reputation: 821
I found these to be suitable because the buttons are just above -
and +
buttons on mac.
{
"key": "ctrl+f11",
"command": "workbench.action.decreaseViewSize"
},
{
"key": "ctrl+f12",
"command": "workbench.action.increaseViewSize"
}
Upvotes: 0
Reputation: 13887
On a Mac (If you are on Windows or Linux replace cmd with ctrl):
cmd-k cmd-s
Type current view size
Double click on Decrease Current View Size
Type whatever key combo you want. I like using F3
Double click on Increase Current View Size
Type whatever key combo you want. I like using F4
Upvotes: 14
Reputation: 3548
There is no default shortcut for this but you can make your own.
Go to File > Preferences > Keyboard shortcuts
(or you can use the shortcut ctrl+k ctrl+s to open it on Linux and Windows, or cmd+k cmd+s on Mac)
Search for current view size
and you can set your custom key combinations for decreasing and increasing the size of the current view.
Upvotes: 33
Reputation: 303
The Increase Current View Size
and Decrease Current View Size
commands adjust both the width and the height of the view.
In case you would like too adjust just the width of the editor, use Decrease editor width
and Increase editor width
commands.
Upvotes: 7
Reputation: 1205
In split view, if you double click the current editor tab then it will increase to max, double click again and it will reset to 50%. Not a shortcut key but pretty nice nonetheless
Upvotes: 10
Reputation: 4804
Code ( File on window ) >> Preferences >> Keyboard shortcuts.
to the top right there is an icon to open user keyboard shortcuts.
adjust the keys to your linkings.
{
"key": "ctrl+shift+o",
"command": "workbench.action.decreaseViewSize"
},
{
"key": "ctrl+shift+i",
"command": "workbench.action.increaseViewSize"
}
Upvotes: 13