Last active
December 24, 2022 06:32
-
-
Save jokereven/cf6f9528fc693b8d1600fd6880504f1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 将键绑定放在此文件中以覆盖默认值auto[] | |
[ | |
{ | |
"key": "shift+alt+z", | |
"command": "editor.action.copyLinesUpAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "shift+alt+up", | |
"command": "-editor.action.copyLinesUpAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+shift+f5", | |
"command": "-autojspro.rerun" | |
}, | |
{ | |
"key": "ctrl+1 ctrl+2", | |
"command": "workbench.action.terminal.focus" | |
}, | |
{ | |
"key": "ctrl+n f", | |
"command": "explorer.newFolder" | |
}, | |
{ | |
"key": "ctrl+n d", | |
"command": "explorer.newFile" | |
}, | |
// --- 全局命令 | |
// 显示命令面板 | |
{ | |
"key": "ctrl+g c", | |
"command": "workbench.action.showCommands" | |
}, | |
// 打开设置页面 | |
{ | |
"key": "ctrl+g s", | |
"command": "workbench.action.openSettings" | |
}, | |
// 打开热键映射 | |
{ | |
"key": "ctrl+g k", | |
"command": "workbench.action.openGlobalKeybindings" | |
}, | |
// 打开一个目录 | |
{ | |
"key": "ctrl+g m", | |
"command": "workbench.action.files.openFolder" | |
}, | |
// 打开一个文件 | |
{ | |
"key": "ctrl+g f", | |
"command": "workbench.action.files.openFile" | |
}, | |
// 打开最近记录 | |
{ | |
"key": "ctrl+g h", | |
"command": "workbench.action.openRecent" | |
}, | |
// 新建vscode实例 | |
{ | |
"key": "ctrl+g n", | |
"command": "workbench.action.newWindow" | |
}, | |
// 关闭vscode实例 | |
{ | |
"key": "ctrl+g q", | |
"command": "workbench.action.closeWindow" | |
}, | |
// --- 文件命令 | |
// 新建文件 | |
{ | |
"key": "ctrl+p n", | |
"command": "welcome.showNewFileEntries" | |
}, | |
// 打开文件 | |
{ | |
"key": "ctrl+p o", | |
"command": "workbench.action.files.openFileFolder" | |
}, | |
// 另存为文件 | |
{ | |
"key": "ctrl+p e", | |
"command": "workbench.action.files.saveAs" | |
}, | |
// 保存文件 | |
{ | |
"key": "ctrl+p s", | |
"command": "workbench.action.files.save" | |
}, | |
// 保存所有文件 | |
{ | |
"key": "ctrl+p w", | |
"command": "workbench.action.files.saveAll" | |
}, | |
// 关闭文件 | |
{ | |
"key": "ctrl+p q", | |
"command": "workbench.action.closeActiveEditor" | |
}, | |
// 关闭所有文件 | |
{ | |
"key": "ctrl+p a", | |
"command": "workbench.action.closeAllEditors" | |
}, | |
// -- 代码折叠命令 | |
// 折叠 | |
{ | |
"key": "ctrl+m ctrl+0", | |
"command": "editor.foldAll", | |
"when": "editorTextFocus && foldingEnabled" | |
}, | |
// 取消折叠 | |
{ | |
"key": "ctrl+m ctrl+j", | |
"command": "editor.unfoldAll", | |
"when": "editorTextFocus && foldingEnabled" | |
}, | |
// -- 侧边栏命令 | |
// 切换侧边栏显示状态 | |
{ | |
"key": "ctrl+n [", | |
"command": "workbench.action.toggleSidebarVisibility" | |
}, | |
// 显示文件资源管理器 | |
{ | |
"key": "ctrl+n 1", | |
"command": "workbench.files.action.focusFilesExplorer" | |
}, | |
// 显示TODO Tree | |
{ | |
"key": "ctrl+n 2", | |
"command": "todo-tree-view.focus" | |
}, | |
// 显示全局搜索 | |
{ | |
"key": "ctrl+n 3", | |
"command": "workbench.action.replaceInFiles" | |
}, | |
// 显示debug | |
{ | |
"key": "ctrl+n 4", | |
"command": "workbench.view.debug", | |
"when": "viewContainer.workbench.view.debug.enabled" | |
}, | |
// 显示版本控制 | |
{ | |
"key": "ctrl+n 5", | |
"command": "workbench.view.scm", | |
"when": "workbench.scm.active" | |
}, | |
// 显示SQL Tools | |
{ | |
"key": "ctrl+n 6", | |
"command": "workbench.view.extension.sqltoolsActivityBarContainer" | |
}, | |
// 显示Docker | |
{ | |
"key": "ctrl+n 7", | |
"command": "workbench.view.extension.dockerView" | |
}, | |
// 显示测试 | |
{ | |
"key": "ctrl+n 8", | |
"command": "workbench.view.testing.focus" | |
}, | |
// 显示插件商店 | |
{ | |
"key": "ctrl+n 9", | |
"command": "workbench.view.extensions", | |
"when": "viewContainer.workbench.view.extensions.enabled" | |
}, | |
// --- 面板命令 | |
// 切换面板显示状态 | |
{ | |
"key": "ctrl+p [", | |
"command": "workbench.action.togglePanel" | |
}, | |
// 显示问题 | |
{ | |
"key": "ctrl+p 1", | |
"command": "workbench.panel.markers.view.focus" | |
}, | |
// 显示输出 | |
{ | |
"key": "ctrl+p 2", | |
"command": "workbench.action.output.toggleOutput", | |
"when": "workbench.panel.output.active" | |
}, | |
// 显示终端 | |
{ | |
"key": "ctrl+p 3", | |
"command": "workbench.action.terminal.toggleTerminal", | |
"when": "terminal.active" | |
}, | |
// 显示调试控制台 | |
{ | |
"key": "ctrl+p 4", | |
"command": "workbench.debug.action.toggleRepl", | |
"when": "workbench.panel.repl.view.active" | |
}, | |
// 显示SQL CONSOLE | |
{ | |
"key": "ctrl+p 5", | |
"command": "workbench.view.extension.sqltoolsPanelContainer" | |
}, | |
// --- 编辑区命令 | |
// 关闭当前选项卡或分屏 | |
{ | |
"key": "ctrl+q", | |
"command": "workbench.action.closeActiveEditor" | |
}, | |
// 聚集在第一个选项卡中 | |
{ | |
"key": "ctrl+e", | |
"command": "workbench.action.focusFirstEditorGroup" | |
}, | |
// 切换到上一个选项卡 | |
{ | |
"key": "ctrl+,", | |
"command": "workbench.action.previousEditor" | |
}, | |
// 切换到下一个选项卡 | |
{ | |
"key": "ctrl+.", | |
"command": "workbench.action.nextEditor" | |
}, | |
// 拆分一个上下分屏 | |
{ | |
"key": "ctrl+w s", | |
"command": "workbench.action.splitEditorDown" | |
}, | |
// 拆分一个左右分屏 | |
{ | |
"key": "ctrl+w v", | |
"command": "workbench.action.splitEditor" | |
}, | |
// 将光标向上动1屏 | |
{ | |
"key": "ctrl+w k", | |
"command": "workbench.action.focusAboveGroup" | |
}, | |
// 将光标向下动1屏 | |
{ | |
"key": "ctrl+w j", | |
"command": "workbench.action.focusBelowGroup" | |
}, | |
// 将光标向左移动1屏 | |
{ | |
"key": "ctrl+w h", | |
"command": "workbench.action.focusLeftGroup" | |
}, | |
// 将光标向右移动1屏 | |
{ | |
"key": "ctrl+w l", | |
"command": "workbench.action.focusRightGroup" | |
}, | |
// --- 代码编辑命令 | |
// 触发帮助提示 | |
{ | |
"key": "ctrl+h", | |
"command": "editor.action.showHover", | |
"when": "editorTextFocus" | |
}, | |
// 触发参数提示 | |
{ | |
"key": "ctrl+j", | |
"command": "editor.action.triggerParameterHints", | |
"when": "editorHasSignatureHelpProvider && editorTextFocus" | |
}, | |
{ | |
"key": "ctrl+j", | |
"command": "closeParameterHints", | |
"when": "editorFocus && parameterHintsVisible" | |
}, | |
// 触发建议提示 | |
{ | |
"key": "ctrl+k", | |
"command": "editor.action.triggerSuggest", | |
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+k", | |
"command": "hideSuggestWidget", | |
"when": "suggestWidgetVisible && textInputFocus" | |
}, | |
// 移动到下一个建议 | |
{ | |
"key": "ctrl+n", | |
"command": "selectNextSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
// 移动到上一个建议 | |
{ | |
"key": "ctrl+p", | |
"command": "selectPrevSuggestion", | |
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" | |
}, | |
// 格式化代码 | |
{ | |
"key": "ctrl+alt+l", | |
"command": "editor.action.formatDocument", | |
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor" | |
}, | |
// 放大字体 | |
{ | |
"key": "ctrl+=", | |
"command": "editor.action.fontZoomIn" | |
}, | |
// 缩小字体 | |
{ | |
"key": "ctrl+-", | |
"command": "editor.action.fontZoomOut" | |
}, | |
// --- 取消一些vim插件的额外功能 | |
{ | |
"key": "ctrl+a", | |
"command": "-extension.vim_ctrl+a", | |
"when": "editorTextFocus && vim.active && vim.use<D-a> && !inDebugRepl && vim.mode != 'Insert'" | |
}, | |
{ | |
"key": "alt+ctrl+down", | |
"command": "-extension.vim_ctrl+alt+down", | |
"when": "editorTextFocus && vim.active && !inDebugRepl" | |
}, | |
{ | |
"key": "alt+ctrl+up", | |
"command": "-extension.vim_ctrl+alt+up", | |
"when": "editorTextFocus && vim.active && !inDebugRepl" | |
}, | |
{ | |
"key": "ctrl+c", | |
"command": "-extension.vim_ctrl+c", | |
"when": "editorTextFocus && vim.active && vim.overrideCopy && vim.use<D-c> && !inDebugRepl" | |
}, | |
{ | |
"key": "ctrl+v", | |
"command": "-extension.vim_ctrl+v", | |
"when": "editorTextFocus && vim.active && vim.use<D-v> && vim.mode == ''CommandlineInProgress' !inDebugRepl' || editorTextFocus && vim.active && vim.use<D-v> && !inDebugRepl && vim.mode == 'SearchInProgressMode'" | |
}, | |
{ | |
"key": "ctrl+d", | |
"command": "-extension.vim_ctrl+d", | |
"when": "editorTextFocus && vim.active && vim.use<D-d> && !inDebugRepl" | |
}, | |
{ | |
"key": "ctrl+left", | |
"command": "-extension.vim_ctrl+left", | |
"when": "editorTextFocus && vim.active && vim.use<D-left> && !inDebugRepl && vim.mode != 'Insert'" | |
}, | |
{ | |
"key": "ctrl+right", | |
"command": "-extension.vim_ctrl+right", | |
"when": "editorTextFocus && vim.active && vim.use<D-right> && !inDebugRepl && vim.mode != 'Insert'" | |
}, | |
// | |
// | |
// --- 取消或更改一些vscode键位 | |
// ctrl+a全选功能在非INSERT模式下不生效 | |
// | |
// | |
{ | |
"key": "ctrl+a", | |
"command": "editor.action.selectAll", | |
"when": "vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualLine' && vim.mode != 'VisualBlock' && vim.mode != 'CommandlineInProgress'" | |
}, | |
{ | |
"key": "ctrl+a", | |
"command": "-editor.action.selectAll" | |
}, | |
// ctrl+c或者ctrl+v功能在非INSERT模式下不生效 | |
{ | |
"key": "ctrl+c", | |
"command": "-editor.action.clipboardCopyAction" | |
}, | |
{ | |
"key": "ctrl+v", | |
"command": "-editor.action.clipboardPasteAction" | |
}, | |
{ | |
"key": "ctrl+c", | |
"command": "-execCopy" | |
}, | |
{ | |
"key": "ctrl+c", | |
"command": "execCopy", | |
"when": "vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualLine' && vim.mode != 'VisualBlock' && vim.mode != 'CommandlineInProgress'" | |
}, | |
{ | |
"key": "ctrl+v", | |
"command": "-execPaste" | |
}, | |
{ | |
"key": "ctrl+v", | |
"command": "execPaste", | |
"when": "vim.mode != 'Normal' && vim.mode != 'Visual' && vim.mode != 'VisualLine' && vim.mode != 'VisualBlock' && vim.mode != 'CommandlineInProgress'" | |
}, | |
// | |
// | |
// --- 资源管理器中对文件或目录的操作 | |
// | |
// | |
// 新建文件 | |
{ | |
"key": "i", | |
"command": "explorer.newFile", | |
"when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus " | |
}, | |
// 新建目录 | |
{ | |
"key": "o", | |
"command": "explorer.newFolder", | |
"when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus " | |
}, | |
// 刷新资源管理器 | |
{ | |
"key": "r", | |
"command": "workbench.files.action.refreshFilesExplorer", | |
"when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus " | |
}, | |
// 重命名文件或目录 | |
{ | |
"key": "a", | |
"command": "renameFile", | |
"when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus " | |
}, | |
// 删除文件或目录 | |
{ | |
"key": "d", | |
"command": "deleteFile", | |
"when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus " | |
}, | |
// 剪切文件或目录 | |
{ | |
"key": "x", | |
"command": "filesExplorer.cut", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
}, | |
// 复制文件或目录 | |
{ | |
"key": "y", | |
"command": "filesExplorer.copy", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" | |
}, | |
// 粘贴文件或目录 | |
{ | |
"key": "p", | |
"command": "filesExplorer.paste", | |
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment