Is there a shortcut to hide the side bar in Visual Studio Code?

It'd be handy if there was a keyboard shortcut for hiding and showing the sidebar. Sublime has cmd+k+b and it's a quick way of gaining some screen real estate when you need it. Anybody know if this exists or if the user can add it manually to VS Code?


The command can be triggered via Ctrl+B on Windows and Linux or Cmd+B on the Mac.


There are 3 bars on the side, 2 left and 1 right:

  • the activity bar with 5 buttons
  • the sidebar toggled by clicking any of the activity bar buttons.
  • the minimap

All of these hotkeys and more (e.g. the terminal & output panel, Ctrl+J) are now visible through the View (Alt-V) and View>Appearance menus:

Appearance menu

The activity bar has no toggle hotkey by default, but you can assign one like this:

{
   "key": "ctrl+alt+b",
   "command": "workbench.action.toggleActivityBarVisibility"
},

Or hide completely with "workbench.activityBar.visible": false

The sidebar toggle hotkey is Ctrl+B by default, but may be overridden by e.g. vim plugin, here's how to enforce or change it:

{
  "key": "ctrl+b",
  "command": "workbench.action.toggleSidebarVisibility"
},

The minimap can be hidden with "editor.minimap.enabled": false and toggled with editor.action.toggleMinimap since vscode 1.16.

And with the Sidebar-activity toggler extension, so you toggle both activity and sidebar together with one key mapping to sidebar-activity-toggler.toggleSidebarAndActivityBar


To Hide the 5 button Activity Bar we can now:

View -> Hide Activity Bar

This is in vscode 1.9, not sure which version it was introduced in.

enter image description here