vscode vim 快捷键设置

// 将键绑定放在此文件中以覆盖默认值
[
{
“key”: “tab”,
“command”: “selectNextSuggestion”,
“when”: “suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion”
},
{
“key”: “tab”,
“command”: “selectNextCodeAction”,
“when”: “codeActionMenuVisible”
},
{
“key”: “shift+tab”,
“command”: “selectPrevCodeAction”,
“when”: “codeActionMenuVisible”
},
{
“key”: “shift+tab”,
“command”: “selectPrevSuggestion”,
“when”: " suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
},
{
“key”: “ctrl+l”, // 焦点从编辑器移动到主菜单栏
“command”: “runCommands”,
“args”: {
“commands”: [
“workbench.action.focusSideBar”
]
},
“when”: “editorTextFocus && textInputFocus && vim.mode == ‘Normal’”
},
{
“key”: “ctrl+k”, // 焦点从终端移动到编译器
“command”: “workbench.action.focusFirstEditorGroup”,
“when”: “panelFocus”
},
{
“key”: “ctrl+l”, // 焦点从主菜单移动到编译器
“command”: “workbench.action.focusFirstEditorGroup”,
“when”: “sideBarFocus”
},
{
“key”: “ctrl+m”, // 面板最大化
“command”: “workbench.action.toggleMaximizedPanel”,
“when”: “panelFocus”
},
{
“key”: “ctrl+l”, // 切换拆分终端
“command”: “workbench.action.terminal.focusPreviousPane”,
“when”: “terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported”
},
{
“key”: “ctrl+shift+k”, // 在多个终端的时候切换上下终端
“command”: “workbench.action.terminal.focusNext”,
“when”: “terminalFocus && terminalHasBeenCreated && !terminalEditorFocus || terminalFocus && terminalProcessSupported && !terminalEditorFocus”
},
{
“key”: “ctrl+shift+n”, // 创建拆分终端
“command”: “workbench.action.terminal.split”,
“when”: “terminalFocus && terminalProcessSupported || terminalFocus && terminalWebExtensionContributedProfile”
},
{
“key”: “ctrl+j”,
“command”: “runCommands”,
“args”: {
“commands”: [
“workbench.action.togglePanel”,
“workbench.action.focusPanel”
]
},
“when”: “!panelVisible”
},
{
“key”: “ctrl+j”,
“command”: “workbench.action.focusPanel”,
“when”: “editorTextFocus”
},
{
“key”: “ctrl+j”,
“command”: “workbench.action.togglePanel”,
“when”: “panelFocus”
},
{
“key”: “ctrl+o”,
“command”: “workbench.action.nextPanelView”,
“when”: “activePanel && panelFocus”
},
{
“key”: “ctrl+i”,
“command”: “workbench.action.previousPanelView”,
“when”: “activePanel && panelFocus”
},
// {
// “key”: “ctrl+c”,
// “command”: “runCommands”,
// “args”: {
// “commands”: [
// “editor.action.clipboardCopyAction”,
// “extension.vim_ctrl+c”
// ]
// },
// “when”: “textInputFocus && vim.active && vim.mode = ‘Insert’”
// },
{
“key”: “ctrl+n”, // 新建文件
“command”: “explorer.newFile”,
“when”: “textInputFocus || filesExplorerFocus”
},
{
“key”: “ctrl+n”, // 新建终端
“command”: “workbench.action.terminal.new”,
“when”: “terminalFocus”
},
// {
// “key”: “d”, // 删除文件
// “command”: “moveFileToTrash”,
// “when”: “sideBarFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus”
// // “when”: " sideBarFocus && explorerResourceMoveableToTrash && filesExplorerFocus && foldersViewVisible && !explorerResourceReadonly && !inputFocus"
// },
{
“key”: “ctrl+a”,
“command”: “extension.vim_cmd+a”, // vim 全选
“when”: “editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != ‘Insert’”
},
{
“key”: “p”,
“command”: “filesExplorer.paste”,
“when”: “sideBarFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus”
},
{
“key”: “u”,
“command”: “undo”,
“when”: “sideBarFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus”
},
{
“key”: “shift+u”,
“command”: “-undo”,
“when”: “sideBarFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus”
},
{
“key”: “d”,
“command”: “deleteFile”,
“when”: “sideBarFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus”
},
{
“key”: “a”,
“command”: “renameFile”,
“when”: " sideBarFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus "
},
{
“key”: “o”,
“command”: “workbench.files.action.collapseExplorerFolders”,
“when”: “sideBarFocus && explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus”
},
{
“key”: “alt+enter”, // 触发fix
“command”: “editor.action.quickFix”,
“when”: “editorHasCodeActionsProvider && textInputFocus && !editorReadonly”
},
{
“key”: “ctrl+k”,
“command”: “editor.action.triggerSuggest”,
“when”: “editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible”
},
{
“key”: “ctrl+shift+j”, // 下一个sidebar
“command”: “runCommands”,
“args”: {
“commands”: [
“workbench.action.nextSideBarView”,
“workbench.action.focusSideBar”
]
},
// “when”: “sideBarFocus && (!inputFocus || activeViewlet==‘workbench.view.search’ || activeViewlet ==‘workbench.view.extensions’)”
“when”: “sideBarFocus”
},
{

"key": "ctrl+shift+k", // 上一个sidebar
"command": "runCommands",
 "args": {
   "commands": [
     "workbench.action.previousSideBarView",
     "workbench.action.focusSideBar"
   ]
 },
// "command": "workbench.action.previousSideBarView",
// "when": "sideBarFocus && (!inputFocus  ||  activeViewlet=='workbench.view.search' || activeViewlet =='workbench.view.extensions')"
"when": "sideBarFocus"

},
{
“key”: “ctrl+k”,
“command”: “editor.action.inlineSuggest.hide”,
“when”: “inlineSuggestionVisible”
},
{
“key”: “ctrl+k”,
“command”: “hideSuggestWidget”,
“when”: “suggestWidgetVisible && textInputFocus”
},
{
“key”: “ctrl+i”,
“command”: “-editor.action.triggerSuggest”,
“when”: “editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible”
},
// {
// “key”: “ctrl+d”,
// “command”: “editor.action.copyLinesDownAction”,
// “when”: “editorTextFocus && !editorReadonly”
// },
{
“key”: “shift+alt+down”,
“command”: “-editor.action.copyLinesDownAction”,
“when”: “editorTextFocus && !editorReadonly”
},
// {
// “key”: “ctrl+r”,
// “command”: “workbench.action.debug.restart”,
// “when”: “inDebugMode”
// },
// {
// “key”: “l”,
// “command”: “workbench.action.debug.stepInto”,
// “when”: “inDebugMode && debugState==‘stopped’”
// },
// {
// “key”: “j”,
// “command”: “workbench.action.debug.stepInto”,
// “when”: “inDebugMode && debugState==‘stopped’”
// },
// {
// “key”: “k”,
// “command”: “workbench.action.debug.stepOver”,
// “when”: “inDebugMode && debugState ==‘stopped’”
// },
// {
// “key”: “ctrl+c”,
// “command”: “workbench.action.debug.continue”,
// “when”: “debugState == ‘stopped’”
// },
// {
// “key”: “ctrl+k i”,
// “command”: “editor.debug.action.toggleInlineBreakpoint”,
// “when”: “editorTextFocus && inDebugMode”
// },
{
“key”: “ctrl+j”,
“command”: “-extension.vim_ctrl+j”,
“when”: “editorTextFocus && vim.active && vim.use && !inDebugRepl”
},
{
“key”: “ctrl+e”,
“command”: “-workbench.action.quickOpen”
},
{
“key”: “ctrl+e”,
“command”: “workbench.view.explorer”,
“when”: “viewContainer.workbench.view.explorer.enabled”
},
{
“key”: “ctrl+shift+e”,
“command”: “-workbench.view.explorer”,
“when”: “viewContainer.workbench.view.explorer.enabled”
},
{
“key”: “ctrl+alt+r”,
“command”: “-rest-client.request”,
“when”: “editorTextFocus && editorLangId == ‘http’”
},
// {
// “key”: “ctrl+b”,
// “command”: “rest-client.rerun-last-request”,
// “when”: “”
// }
// {
// “key”: “q”,
// “command”: “workbench.action.closeActiveEditor”,
// “when”: “editorFocus && vim.mode == ‘Normal’”,
// },
// {
// “key”: “b”,
// “command”: “rest-client.rerun-last-request”,
// “when”: “editorTextFocus && vim.mode == ‘Normal’”,
// },
{
“key”: “ctrl+j”,
“command”: “-workbench.action.togglePanel”
},
{
“key”: “ctrl+l”,
“command”: “-expandLineSelection”,
“when”: “textInputFocus”
},
{
“key”: “j”,
“command”: “extension.vim_down”,
“when”: “inOutput && panelFocus”
},
{
“key”: “l”,
“command”: “extension.vim_right”,
“when”: “inOutput && panelFocus”
},
{
“key”: “shift+j”,
“command”: “cursorDownSelect”,
“when”: “inOutput && panelFocus”
},
{
“key”: “shift+k”,
“command”: “cursorUpSelect”,
“when”: “inOutput && panelFocus”
},
{
“key”: “shift+l”,
“command”: “cursorRightSelect”,
“when”: “inOutput && panelFocus”
},
{
“key”: “shift+h”,
“command”: “cursorLeftSelect”,
“when”: “inOutput && panelFocus”
},
{
“key”: “h”,
“command”: “extension.vim_left”,
“when”: “inOutput && panelFocus”
},
{
“key”: “k”,
“command”: “extension.vim_up”,
“when”: “inOutput && panelFocus”
},
// {
// “key”: “q”,
// “command”: “workbench.output.action.clearOutput”,
// “when”: “focusedView && panelFocus”
// },
// {
// 显示右键菜单
// “key”: “i”,
// “command”: “editor.action.showContextMenu”,
// “when”: “editorHasSelection && vim.mode == ‘VisualLine’”
// }
{
“key”: “enter”,
“command”: “runCommands”,
“args”: {
“commands”: [
“code-runner.run”,
“extension.vim_escape”
]
},
“when”: “editorHasSelection && vim.mode == ‘VisualLine’”
},
{
“key”: “enter”,
“command”: “runCommands”,
“args”: {
“commands”: [
“workbench.action.files.saveFiles”,
“code-runner.run”
]
},
“when”: “!renameInputVisible && editorLangId == ‘javascript’ && vim.mode == ‘Normal’”
},

{
“key”: “enter”,
“command”: “rest-client.request”, // 发送http 请求
“when”: “editorLangId==‘http’ && vim.mode == ‘Normal’”
},
{
“key”: “enter”, // 请求接口
“command”: “rest-client.rerun-last-request”,
“when”: “editorLangId ==‘php’ && editorTextFocus && textInputFocus && vim.mode == ‘Normal’”
},
{
“key”: “q”,
“command”: “workbench.action.closeActiveEditor”,
“when”: “httpResponsePreviewFocus”
},
{
“key”: “q”,
“command”: “workbench.action.closeActiveEditor”,
“when”: “editorFocus && editorTextFocus && vim.mode == ‘Normal’”
},
{
“key”: “f”, //文件搜索
“command”: “list.find”,
“when”: “listFocus && listSupportsFind && !inputFocus”
},
// {
// “key”: “i”, // ctrl+p 快速面板 input 获取焦点
// “command”: “workbench.action.quickOpenWithModes”,
// “when”: “inQuickOpen && listFocus && !inputFocus”
// },
{
“key”: “q”, // ctrl+p 快速面板
“command”: “workbench.action.closeQuickOpen”,
“when”: “inQuickOpen && listFocus && !inputFocus”
},
{
“key”: “ctrl+alt+f”,
“command”: “-list.find”,
“when”: “listFocus && listSupportsFind”
},
{
“key”: “ctrl+l”,
“command”: “workbench.action.focusFirstEditorGroup”,
“when”: “activeEditor == ‘WebviewEditor’”
},
{
“key”: “q”,
“command”: “notifications.hideToasts”,
“when”: “notificationToastsVisible”
},
{
“key”: “q”,
“command”: “list.clear”,
“when”: “listFocus && listHasSelectionOrFocus && !inputFocus && !treestickyScrollFocuse”
},
{
“key”: “q”,
“command”: “list.closeFind”,
“when”: “listFocus && treeFindOpen”
},
{
“key”: “h”,
“command”: “previousCompressedFolder”,
“when”: “explorerViewletCompressedFocus && filesExplorerFocus && foldersViewVisible && !explorerViewletCompressedFirstFocus && !inputFocus”
},
{
“key”: “l”,
“command”: “nextCompressedFolder”,
“when”: “explorerViewletCompressedFocus && filesExplorerFocus && foldersViewVisible && !explorerViewletCompressedLastFocus && !inputFocus”
},
// {
// “key”: “l”,
// “command”: “-list.select”,
// “when”: “listFocus && !inputFocus”
// }

{
“key”: “enter”,
“command”: “editor.action.inlineSuggest.commit”,
“when”: “!suggestWidgetVisible && inlineSuggestionVisible && tabnine.tab-override && !editorTabMovesFocus”
},
{
“key”: “tab”,
“command”: “-editor.action.inlineSuggest.commit”,
“when”: “inlineSuggestionVisible && tabnine.tab-override && !editorTabMovesFocus”
},
{
“key”: “tab”,
“command”: “-tabnine.tab-override”,
“when”: “suggestWidgetHasFocusedSuggestion && suggestWidgetVisible && tabnine.tab-override && textInputFocus”
},
{
“key”: “tab”,
“command”: “-editor.action.inlineSuggest.commit”,
“when”: “inlineSuggestionHasIndentationLessThanTabSize && inlineSuggestionVisible && !editorHoverFocused && !editorTabMovesFocus && !suggestWidgetVisible”
},
{
“key”: “ctrl+oem_comma”,
“command”: “-workbench.action.openSettings”
},
{
“key”: “ctrl+oem_comma”,
“command”: “workbench.action.toggleAuxiliaryBar”
},
{
“key”: “ctrl+alt+b”,
“command”: “-workbench.action.toggleAuxiliaryBar”
}
]

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值