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.

相关推荐
【ql君】qlexcel8 小时前
Visual Studio Code的使用,VS code常用扩展
ide·vscode·编辑器·visual studio·扩展
望眼欲穿的程序猿10 小时前
Vscode Clangd 无法索引 C++17 或者以上标准
java·c++·vscode
卓小帅的博客16 小时前
解决vscode中无法使用特定语言注释的问题
ide·vscode·编辑器·快捷键·无法注释
hello_fengfeng19 小时前
VSCode Remote-SSH 连接失败修复(权限问题)
ide·vscode·ssh
赖念安20 小时前
在 vscode 的 NPM SCRIPTS 面板点击执行后脚本失败
ide·vscode·npm
golang学习记20 小时前
VS Code官宣:全面支持Rust!
开发语言·vscode·后端·rust
Three~stone20 小时前
Visual Studio Code 2025 安装教程以及汉化教程
ide·vscode·编辑器
原来是猿21 小时前
vscode下载+插件
ide·vscode·编辑器
lovingsoft21 小时前
VSCode+Claude Code+Playwright-MCP 配置实操|零踩坑,1分钟打通AI浏览器自动化
人工智能·vscode·自动化
梦游钓鱼2 天前
vscode通过设置ctrl+鼠标滚轮设置终端字体大小
ide·vscode·编辑器