VivekDev
VivekDev

Reputation: 25553

Collapse and Expand the View Bar in visual studio code shortcut key

Is there a shortcut key to collapse and expand the view bar (the left vertical menu) in visual studio code?

With the mouse, I can do that, by click any item twice in the view bar such as Explorer, Search, SCM etc, and the view bar collapses.

How to do that using keyboard?

The following shows expanded and then collapsed.

View bar expanded in Visual Studio Code

View bar collapsed in Visual Studio Code

Upvotes: 4

Views: 2328

Answers (2)

Yashu Mittal
Yashu Mittal

Reputation: 1676

You can define custom key-binding in VS Code (on windows).

To open keyboard shortcuts, use ctrl + k, ctrl + s.

If you want to toggle Activity Bar visibility ctrl+alt+\.

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

If you want to toggle Sidebar visibility ctrl+\.

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

Upvotes: 0

billyjov
billyjov

Reputation: 2970

You should be able to archieve this using Ctrl + B.

Upvotes: 9

Related Questions