Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode keybinding to hide Explorer

People also ask

How do you collapse the Explorer in VS Code?

“vs code explorer collapse keys” Code Answer'sOn Windows: Shift + Alt + Up/Down. On Mac: Shift + Option + Up/Down. On Ubuntu: Ctrl + Shift + Alt + Up/Down.

What is Ctrl K in VS Code?

To launch the Define Keybinding widget, press Ctrl+K Ctrl+K. The widget listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout.

What is Ctrl Shift P in VS Code?

You can define a keyboard shortcut for any task. From the Command Palette (Ctrl+Shift+P), select Preferences: Open Keyboard Shortcuts File, bind the desired shortcut to the workbench.

What is Ctrl Shift L in VS Code?

Press Ctrl + Shift + L . This will select all words that match your current selection. It also adds a cursor to each text span matching your current selection. Simply start typing your replacement text and vscode will start replacing all instances of text matching your selection in-editor as you type.


Toggle Sidebar Visibility: Ctrl+B (Windows/Linux)

If you're a MacOS user, then it's + b.

Visual Studio Code Key Bindings


If you're a MacOS user, then it's + b.

I won't leave you without a GIF.

shortcut for mac VS Code


Some clarification: usually Ctrl+B is used for closing a sidebar (not toggling by default). So if you haven't a sidebar and want to open it - press the following combination: Ctrl+Shift+E(opens the sidebar with active explorer) or Ctr+Shift+F (with active search) etc. Now if you want to get rid of a sidebar press Ctrl+B. Note if you're using vim plugin and want to close a sidebar but currently is working on your code - first make a sidebar active by pressing (Ctrl+Shift+E) and then close it via Ctrl+B.

update: recently I've discovered that Ctrl+Shift+E doesn't play nice with my neo vim plugin, so in order to overcome it there is another shortcut to open sidebar explorer: single press of Ctrl+0 to open it and pressing of Ctrl+0 one more time to get focus on it.


I'm using Visual Studio keymap. On my keyboard shortcuts, Toggle Side Bar Visibility was set to CTRL+B but doesn't works.

I do remap to CTRL+B and works fine.

File > Preferences > KeyBoard ShortCuts


VSCode default Keybinding for Toggling "Side Bar" aka "Explorer" is CTRL+B. Just CTRL+B alone works fine.


If you want to use cmd+b to open and close your explorer add these lines to your keybindings.json

    {
        "key": "cmd+e",
        "command": "workbench.view.explorer"
    },
    {
        "key": "cmd+e",
        "command": "-workbench.view.explorer"
    },
    {
        "key": "cmd+e",
        "command": "workbench.action.toggleSidebarVisibility",
        "when": "explorerViewletVisible"
    },
    {
        "key": "cmd+e",
        "command": "-workbench.action.toggleSidebarVisibility",
        "when": "explorerViewletVisible"
    },

Of course, you must replace the "e" with "b" !