直接修改C:\Users\Administrator\AppData\Roaming\Code\User\keybindings.json(注意目录根据自己的用户名情况和安装位置而定,我的仅供参考)文件为如下配置:
// 将键绑定放在此文件中以覆盖默认值auto[] [ { "key": "ctrl+shift+j", "command": "editor.action.joinLines" }, { "key": "shift+alt+x", "command": "workbench.files.action.collapseExplorerFolders" }, { "key": "alt+s", "command": "workbench.action.toggleAutoSave" }, { "key": "shift+alt+w", "command": "workbench.action.closeOtherEditors" }, { "key": "shift+alt+oem_6", "command": "workbench.action.closeEditorsToTheRight" }, { "key": "shift+alt+oem_4", "command": "workbench.action.closeEditorsToTheLeft" }, { "key": "ctrl+shift+pagedown", "command": "-workbench.action.moveEditorRightInGroup" }, { "key": "ctrl+shift+pagedown", "command": "workbench.action.moveEditorRightInGroup" }, { "key": "ctrl+numpad0", "command": "editor.action.fontZoomReset" }, { "key": "alt+e", "command": "workbench.action.switchWindow" }, { "key": "alt+insert", "command": "explorer.newFile" }, { "key": "shift+alt+insert", "command": "explorer.newFolder" }, { "key": "alt+enter", "command": "editor.action.quickFix", "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" }, { "key": "ctrl+oem_period", "command": "-editor.action.quickFix", "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" }, { "key": "ctrl+shift+oem_3", "command": "-workbench.action.terminal.new", "when": "terminalProcessSupported" }, { "key": "shift+alt+z", "command": "workbench.action.terminal.newInActiveWorkspace" }, { "key": "ctrl+l", "command": "workbench.action.terminal.clear" }, { "key": "ctrl+alt+k", "command": "workbench.action.openGlobalKeybindings" }, { "key": "ctrl+shift+f", "command": "-vueBeautify.format", "when": "editorTextFocus && editorTextFocus && !editorReadonly && resourceLangId == 'vue'" }, { "key": "alt+m", "command": "editor.action.toggleMinimap" }, { "key": "alt+n", "command": "npm.focus" }, { "key": "shift shift", "command": "workbench.action.gotoSymbol" }, { "key": "ctrl+shift+o", "command": "-workbench.action.gotoSymbol" }, { "key": "shift+alt+l", "command": "editor.action.transformToLowercase" }, { "key": "shift+alt+u", "command": "editor.action.transformToUppercase" }, { "key": "alt+u", "command": "editor.action.transformToTitlecase" }, { "key": "alt+numpad_add", "command": "workbench.action.increaseViewSize" }, { "key": "alt+pagedown", "command": "workbench.action.terminal.resizePaneDown" }, { "key": "alt+numpad_subtract", "command": "workbench.action.decreaseViewSize" }, { "key": "alt+numpad0", "command": "workbench.action.evenEditorWidths" }, { "key": "alt+pageup", "command": "workbench.action.terminal.resizePaneUp" }, { "key": "ctrl+alt+s", "command": "extension.autoScssStruct" }, { "key": "alt+b", "command": "workbench.action.toggleStatusbarVisibility" }, { "key": "shift+alt+k", "command": "workbench.action.openGlobalKeybindingsFile" }, { "key": "alt+f", "command": "workbench.action.toggleZenMode" }, { "key": "alt+q", "command": "workbench.action.toggleActivityBarVisibility" }, { "key": "alt+oem_5", "command": "workbench.action.splitEditorDown" }, { "key": "alt+g", "command": "git.checkout" }, { "key": "ctrl+alt+r", "command": "workbench.files.action.refreshFilesExplorer" }, { "key": "alt+r", "command": "workbench.action.tasks.runTask" }, { "key": "alt+c", "command": "-extension.switchCSS" }, { "key": "alt+c", "command": "extension.switchCSS" }, { "key": "alt+x", "command": "extension.cssrem.rem-switch-px" }, ]
也可以用新的打开快捷方式JSON配置文件的快捷键Ctrl+Alt+K进行编辑配置
或直接用Shift+Alt+K进行编辑配置
传送门设置VSCode打开键盘快捷方式和键盘快捷方式配置JSON分别快捷键为:Ctrl+Alt+K和Shift+Alt+K_你挚爱的强哥(http://www.shuzhiqiang.com)-CSDN博客