vscode 快捷键侧边栏

_____ 配置 vscode 快捷键

visual studio code - open explorer and close sidebar with the same key - Stack Overflow

{

"key": "ctrl+shift+e", // when Explorer not open

// "command": "workbench.view.explorer", // either of these commands works

"command": "workbench.files.action.focusFilesExplorer",

"when": "!explorerViewletVisible"

},

{

"key": "ctrl+shift+e", // when Explorer open

"command": "workbench.action.toggleSidebarVisibility",

"when": "explorerViewletVisible"

}

How did I find those context keys? See Inspect Context Keys Utility.

  1. Open View/Help/Toggle Developer Tools

  2. Go to and clear (right-click) the Console in the Developer Tools

  3. Trigger the command: Developer: Inspect Context Keys from the Command Palette and click anywhere in the vscode window

  4. In the Console, a large object will be created and output. Expand this object open so you can search in it.

  5. With focus in the Console, Ctrl/Cmd+F to open a find input. For me, this appears at the very bottom and is tricky to see.

  6. Type what you want to find, like "explorer"

  7. I found 21 hits and looked at them all to see which were promising - you can Enter through them if focus is in the find input.

explorerViewletVisible looked most promising. Then I looked through the KeyBoard Shortcuts for "view explorer" and then "sidebar" to find commands I thought would work.

相关推荐
Skrrapper4 小时前
【编程史】IDE 是谁发明的?从 punch cards 到 VS Code
c++·ide·vscode
LIN-JUN-WEI1 天前
[ESP32]VSCODE+ESP-IDF环境搭建及blink例程尝试(win10 win11均配置成功)
c语言·开发语言·ide·vscode·单片机·学习·编辑器
织_网1 天前
Visual Studio Code 中统一配置文件在团队协作中的应用
ide·vscode·编辑器
到底起什么网名才能不重名2 天前
使用各种CSS美化网页
前端·css·vscode·bootstrap·html
不知所云,2 天前
3. lvgl 9.3 vscode 模拟环境搭建 lv_port_pc_vscode-release-v9.3
ide·vscode·编辑器·c·sdl·lvgl vscode·lvgl模拟器
墨小傲2 天前
基于Linux下的vscode c/c++开发环境搭建详细教程
linux·c语言·vscode
tan180°3 天前
MySQL表的操作(3)
linux·数据库·c++·vscode·后端·mysql
我在看世界3 天前
家里vscode连公司内网vscede
vscode·ssh
悠悠小茉莉3 天前
Win11 安装 Visual Studio(保姆教程 - 更新至2025.07)
c++·ide·vscode·python·visualstudio·visual studio
SZ1701102313 天前
华为云 银河麒麟 vscode远程连接
ide·vscode·华为云