Skip to main content

我的 Visual Studio Code 快捷键配置

· One min read
Alan

迁移至Visual Studio Code配置;

下面展示一下我的VSC快捷键配置:

macOS

.vscode/keybindings.json
[
// 格式化文档
{
"key": "shift+cmd+i",
"command": "editor.action.formatDocument",
},
// 关闭其他文档
{
"key": "shift+cmd+w",
"command": "workbench.action.closeOtherEditors"
},
{
"key": "shift+cmd+w",
"command": "-workbench.action.closeWindow"
},
// 侧边栏定位当前文件
{
"key": "shift+cmd+r",
"command":"revealInExplorer"
},
{
"key": "ctrl+r",
"command": "renameFile"
}
]

Windows/Linux

.vscode/keybindings.json
[
{
"key": "ctrl+shift+i",
"command": "editor.action.formatDocument"
},
{
"key": "ctrl+shift+w",
"command": "workbench.action.closeOtherEditors"
},
{
"key": "ctrl+shift+r",
"command": "revealInExplorer"
},
{
"key": "alt+left",
"command": "workbench.action.navigateBack"
},
{
"key": "alt+right",
"command": "workbench.action.navigateForward"
},
{
"key": "f12",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+shift+d",
"command": "workbench.action.splitEditorDown"
},
{
"key": "ctrl+shift+l",
"command": "workbench.action.splitEditorLeft"
},
{
"key": "ctrl+shift+s",
"command": "saveAll"
},
{
"key": "ctl+shift+m",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "git status\u000D"
}
},
{
"key": "ctrl+e",
"command": "-workbench.action.quickOpen"
},
{
"key": "ctrl+r",
"command": "renameFile"
}
]