vscode 快捷键 --ING

[
    //-------------------------------------------------
    //查找
    //-------------------------------------------------
    { "key": "ctrl+=",          "command":"editor.action.moveSelectionToNextFindMatch","when":"editorFocus" },
    { "key": "ctrl+-",          "command": "editor.action.moveSelectionToPreviousFindMatch","when": "editorFocus" },

    //当前文件查找
    { "key": "ctrl+f",          "command": "actions.find"},

    //文件夹中查找
    { "key": "alt+f",           "command": "workbench.view.search"},
    { "key": "alt+f",           "command": "workbench.action.findInFiles","when": "!searchInputBoxFocus" },

    //-------------------------------------------------
    //窗口视图
    //-------------------------------------------------
    { "key": "ctrl+alt+,",      "command": "workbench.action.navigateBack" },
    { "key": "ctrl+alt+.",      "command": "workbench.action.navigateForward" },
    { "key": "alt+,",           "command": "workbench.action.navigateBack" },
    { "key": "alt+.",           "command": "workbench.action.navigateForward" },

    //tab
    { "key": "alt+e",           "command": "workbench.action.nextEditor" },
    { "key": "alt+w",           "command": "workbench.action.previousEditor" },
    { "key": "alt+shift+w",     "command": "workbench.action.previousEditor" },

    //{ "key": "alt+t",         "command": "workbench.action.showAllEditors"},

    //default ctrl+tab
    { "key": "alt+t",           "command": "workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup", "when": "!activeEditorGroupEmpty"},

    //关闭当前tab页签
    { "key": "alt+q",           "command": "workbench.action.closeActiveEditor" },
    { "key": "alt+q",           "command": "workbench.action.closeWindow","when": "!editorIsOpen" },
    { "key": "ctrl+alt+q",      "command": "workbench.action.closeAllEditors"},

    //将当前tab页签分割
    { "key": "ctrl+alt+=",      "command": "workbench.action.splitEditorRight" },
    { "key": "ctrl+alt+-",      "command": "workbench.action.splitEditorDown" },

    { "key": "ctrl+alt+0",      "command": "workbench.action.focusRightGroup"},
    { "key": "ctrl+alt+8",      "command": "workbench.action.focusBelowGroup"},
    { "key": "ctrl+alt+7",      "command": "workbench.action.focusAboveGroup"},
    { "key": "ctrl+alt+9",      "command": "workbench.action.focusLeftGroup"},
    { "key": "ctrl+alt+6",      "command": "workbench.action.toggleMaximizeEditorGroup","when": "maximizedEditorGroup || multipleEditorGroups"},

    //放大缩小
    { "key": "alt+=",           "command": "editor.action.fontZoomIn"},
    { "key": "alt+-",           "command": "editor.action.fontZoomOut"},
    { "key": "alt+0",           "command": "editor.action.fontZoomReset"},
    { "key": "shift+alt+=",     "command": "workbench.action.zoomIn" },
    { "key": "shift+alt+-",     "command": "workbench.action.zoomOut" },
    { "key": "shift+alt+0",     "command": "workbench.action.zoomReset" },

    //-------------------------------------------------
    //编辑行
    //-------------------------------------------------
    //插入空白行
    {"key": "ctrl+enter",       "command": "editor.action.insertLineAfter","when": "editorTextFocus && !editorReadonly"},
    {"key": "ctrl+shift+enter", "command": "editor.action.insertLineBefore","when": "editorTextFocus && !editorReadonly"},

    //移动行
    { "key": "alt+down",        "command": "editor.action.moveLinesDownAction","when": "editorTextFocus && !editorReadonly" },
    { "key": "alt+up",          "command": "editor.action.moveLinesUpAction", "when": "editorTextFocus && !editorReadonly" },

    //复制行
    { "key": "shift+alt+down",  "command": "editor.action.copyLinesDownAction","when": "editorTextFocus && !editorReadonly" },
    { "key": "shift+alt+up",    "command": "editor.action.copyLinesUpAction","when": "editorTextFocus && !editorReadonly" },

    //合并行
    { "key": "ctrl+j",          "command": "editor.action.joinLines", "when": "editorTextFocus && !editorReadonly" },

    //删除行
    { "key": "ctrl+d",          "command": "editor.action.deleteLines", "when": "textInputFocus && !editorReadonly" },

    //是否折叠行
    { "key": "ctrl+alt+z",      "command": "editor.action.toggleWordWrap" },

    //-------------------------------------------------
    //文件操作
    //-------------------------------------------------
    //复制当前文件路径
    { "key": "alt+p",           "command": "workbench.action.files.copyPathOfActiveFile" },

    //创建新文件
    { "key": "ctrl+n",          "command": "workbench.action.files.newUntitledFile" },

    //打开文件
    {"key": "alt+d",            "command": "workbench.action.quickOpen"},
    {"key": "alt+d",            "command": "workbench.action.quickOpenNavigateNextInFilePicker","when": "inFilesPicker && inQuickOpen"},

    //打开文件所在位置
    { "key": "alt+r",           "command": "workbench.action.files.revealActiveFileInWindows" },

    //文件管理器
    { "key": "alt+a",           "command": "workbench.files.action.showActiveFileInExplorer"},
    { "key": "ctrl+alt+e",      "command": "workbench.view.explorer" },
    { "key": "ctrl+shift+e",    "command": "workbench.files.action.collapseExplorerFolders" },
    { "key": "alt+`",           "command": "workbench.action.toggleSidebarVisibility" },
    { "key": "ctrl+escape",     "command": "workbench.action.toggleSidebarVisibility" },

    //-------------------------------------------------
    // copy tab
    //-------------------------------------------------


    //将当前tab 复制到新窗口
    { "key": "ctrl+k ctrl+o",             "command": "workbench.action.copyEditorToNewWindow", "when": "activeEditor" },
    //将当前tab group 复制到新窗口
    { "key": "ctrl+k ctrl+p",             "command": "workbench.action.copyEditorGroupToNewWindow" },

    //将当前tab 移动到新窗口
    { "key": "ctrl+j ctrl+o",             "command": "workbench.action.moveEditorToNewWindow" },
    //将当前tab group 移动到新窗口
    { "key": "ctrl+j ctrl+p",             "command": "workbench.action.moveEditorGroupToNewWindow" },

    { "key": "ctrl+shift+k ctrl+shift+o", "command": "workbench.action.restoreEditorsToMainWindow" },

    //将复制出来的tab, tab group置顶显示
    { "key": "ctrl+f12",                  "command": "workbench.action.toggleWindowAlwaysOnTop" },

    { "key": "ctrl+shift+f12",            "command": "workbench.action.toggleCompactAuxiliaryWindow" },
    { "key": "alt+shift+f12",            "command": "workbench.action.toggleCompactAuxiliaryWindow" },
    //切换全屏
    { "key": "ctrl+alt+F12",              "command": "workbench.action.toggleFullScreen" },

    { "key": "ctrl+alt+F11",              "command": "workbench.action.toggleZenMode", "when": "!isAuxiliaryWindowFocusedContext && !isSessionsWindow"},

    // read only, 不能编辑
    { "key": "ctrl+l ctrl+p",             "command": "workbench.action.files.toggleActiveEditorReadonlyInSession" },

    // pin tab, 不能关闭
    { "key": "ctrl+l ctrl+l",             "command": "workbench.action.pinEditor", "when": "!activeEditorIsPinned" },
    { "key": "ctrl+; ctrl+;",             "command": "workbench.action.unpinEditor", "when": "activeEditorIsPinned" },

    //-------------------------------------------------
    // start new vscode instance
    //-------------------------------------------------
    // copy current tab to new vscode instance
    { "key": "ctrl+l ctrl+o",             "command": "workbench.action.files.showOpenedFileInNewWindow" },

    // 新建窗口
    { "key": "ctrl+shift+n",              "command": "workbench.action.newWindow" },
    { "key": "ctrl+w",                    "command": "workbench.action.switchWindow"},
    { "key": "ctrl+alt+w",                "command": "workbench.action.quickSwitchWindow"},
    { "key": "ctrl+shift+w",              "command": "workbench.action.quickSwitchWindow"},

    { "key": "ctrl+shift+o",              "command": "workbench.action.files.openFileFolder" },
    { "key": "ctrl+o",                    "command": "workbench.action.files.openFileFolder" },

    //-------------------------------------------------
    //注释
    //-------------------------------------------------
    { "key": "ctrl+alt+/",      "command": "editor.action.commentLine","when": "editorTextFocus && !editorReadonly"},
    { "key": "ctrl+/",          "command": "editor.action.commentLine","when": "editorTextFocus && !editorReadonly"},
    { "key": "ctrl+shift+/",    "command": "editor.action.blockComment" },

    //-------------------------------------------------
    //基本
    //-------------------------------------------------
    { "key": "ctrl+c",          "command": "editor.action.clipboardCopyAction","when": "textInputFocus"},
    { "key": "ctrl+v",          "command": "editor.action.clipboardPasteAction","when": "textInputFocus && !editorReadonly"},
    { "key": "ctrl+x",          "command": "editor.action.clipboardCutAction","when": "textInputFocus && !editorReadonly"},
    { "key": "ctrl+a",          "command": "editor.action.selectAll"},
    { "key": "ctrl+shift+z",    "command": "redo","when": "textInputFocus && !editorReadonly"},
    { "key": "ctrl+z",          "command": "undo","when": "textInputFocus && !editorReadonly"},
    //保存文件
    { "key": "ctrl+s",          "command": "workbench.action.files.save" },
    { "key": "alt+ctrl+s",      "command": "workbench.action.files.saveAll" },
    { "key": "shift+ctrl+s",    "command": "workbench.action.files.saveAs" },

    //-------------------------------------------------
    //选择
    //-------------------------------------------------

    //括号选择,包含括号
    //光标放在紧贴括号内侧,双击可选中括号内全部内容,不含括号
    //光标放在紧贴引号内侧,双击可选中引号内全部内容,不含引号
    { "key": "ctrl+shift+]",     "command": "editor.action.selectToBracket","when": "textInputFocus" },
    { "key": "ctrl+alt+]",       "command": "editor.action.selectToBracket","when": "textInputFocus" },

    //匹配选择
    {"key": "alt+shift+m",       "command": "editor.action.addSelectionToNextFindMatch","when": "editorFocus"},
    {"key": "ctrl+shift+m",      "command": "editor.action.selectHighlights","when": "editorFocus" },
    {"key": "ctrl+shift+m",      "command": "selectAllSearchEditorMatches","when": "inSearchEditor"},

    //字选择
    { "key": "shift+down",       "command": "list.expandSelectionDown","when": "listFocus && !inputFocus" },
    { "key": "shift+up",         "command": "list.expandSelectionUp","when": "listFocus && !inputFocus" },
    { "key": "shift+left",       "command": "cursorLeftSelect","when": "textInputFocus" },
    { "key": "shift+right",      "command": "cursorRightSelect","when": "textInputFocus" },

    //行选择扩展
    { "key": "alt+shift+i",      "command": "expandLineSelection","when": "textInputFocus"},
    { "key": "ctrl+shift+i",     "command": "expandLineSelection","when": "textInputFocus"},

    //行选择
    { "key": "shift+home",       "command": "cursorHomeSelect","when": "textInputFocus" },
    { "key": "shift+end",        "command": "cursorEndSelect","when": "textInputFocus" },

    //词选择
    { "key": "alt+shift+right",  "command": "cursorWordEndRightSelect","when": "textInputFocus" },
    { "key": "alt+shift+left",   "command": "cursorWordStartLeftSelect","when": "textInputFocus" },

    //页选择
    { "key": "shift+pageDown",   "command": "cursorPageDownSelect","when": "textInputFocus" },
    { "key": "shift+pageUp",     "command": "cursorPageUpSelect","when": "textInputFocus" },

    //文件
    { "key": "shift+alt+end",    "command": "cursorBottomSelect", "when": "textInputFocus"},
    { "key": "shift+alt+home",   "command": "cursorTopSelect", "when": "textInputFocus"},
    { "key": "ctrl+alt+end",     "command": "cursorBottomSelect", "when": "textInputFocus"},
    { "key": "ctrl+alt+home",    "command": "cursorTopSelect", "when": "textInputFocus"},
    //-------------------------------------------------
    //cursor
    //-------------------------------------------------
    { "key": "ctrl+u",           "command": "cursorUndo","when": "textInputFocus" },
    { "key": "ctrl+i",           "command": "cursorRedo","when": "textInputFocus"},

    //词
    { "key": "alt+left",         "command": "cursorWordStartLeft","when": "textInputFocus" },
    { "key": "alt+right",        "command": "cursorWordEndRight", "when": "textInputFocus" },

    //括号
    { "key": "ctrl+]",           "command": "editor.action.jumpToBracket","when": "editorTextFocus"},
    { "key": "alt+]",            "command": "editor.action.jumpToBracket","when": "editorTextFocus"},

    //行
    { "key": "home",             "command": "cursorHome","when": "textInputFocus" },
    { "key": "end",              "command": "cursorEnd","when": "textInputFocus" },

    //文件
    { "key": "alt+home",         "command": "cursorTop","when": "textInputFocus" },
    { "key": "alt+end",          "command": "cursorBottom","when": "textInputFocus" },

    //screen
    { "key": "alt+pageDown",     "command": "-scrollPageDown", "when": "textInputFocus" },
    { "key": "alt+pageUp",       "command": "-scrollPageUp",   "when": "textInputFocus"},
    { "key": "alt+PageUp",       "command": "Viewport.CursorTop", "when": "textInputFocus" },
    { "key": "alt+shift+j",      "command": "Viewport.CursorTop", "when": "textInputFocus" },
    { "key": "alt+PageDown",     "command": "Viewport.CursorBottom", "when": "textInputFocus"},
    { "key": "alt+shift+k",      "command": "Viewport.CursorBottom", "when": "textInputFocus"},
    { "key": "alt+m",            "command": "Viewport.CursorCenter", "when": "textInputFocus"},

    { "key": "alt+j",            "command": "cursorUp", "when": "textInputFocus" },
    { "key": "alt+k",            "command": "cursorDown", "when": "textInputFocus"},
    { "key": "alt+h",            "command": "cursorWordStartLeft","when": "textInputFocus" },
    { "key": "alt+l",            "command": "cursorWordEndRight", "when": "textInputFocus" },
    //-------------------------------------------------
    //scroll view, cursor is not moving
    //-------------------------------------------------
    // current line to High Low Middle
    { "key": "alt+z",        "command": "-editor.action.toggleWordWrap"},
    { "key": "alt+z",        "command": "Viewport.scrollCenter", "when": "editorTextFocus"},
    { "key": "alt+shift+h",  "command": "Viewport.scrollTop", "when": "editorTextFocus"},
    { "key": "alt+shift+l",  "command": "Viewport.scrollBottom", "when": "editorTextFocus"},

    { "key": "ctrl+shift+x", "command": "scrollLeft" },
    { "key": "ctrl+shift+c", "command": "scrollRight" },

    //line
    { "key": "ctrl+e",       "command": "scrollLineDown","when": "textInputFocus" },
    { "key": "ctrl+y",       "command": "scrollLineUp","when": "textInputFocus" },

    //half page
    { "key": "ctrl+r",       "command": "editorScroll",   "args": { "to": "down", "by": "halfPage" },"when": "textInputFocus" },
    { "key": "ctrl+t",       "command": "editorScroll",   "args": { "to": "up", "by": "halfPage" },"when": "textInputFocus" },

    //page
    { "key": "pageDown",     "command": "cursorPageDown","when": "textInputFocus" },
    { "key": "pageUp",       "command": "cursorPageUp","when": "textInputFocus" },

    // whole file
    { "key": "ctrl+end",     "command": "scrollEditorBottom"},
    { "key": "ctrl+home",    "command": "scrollEditorTop"},

    //-------------------------------------------------
    //列编辑
    //-------------------------------------------------
    //alt +鼠标左键单击
    //按住鼠标中键拖拽
    //alt + shift + leftMouseClick
    { "key": "ctrl+shift+alt+up",     "command": "editor.action.insertCursorAbove","when": "editorTextFocus" },
    { "key": "ctrl+shift+alt+down",   "command": "editor.action.insertCursorBelow","when": "editorTextFocus" },

    //-------------------------------------------------
    //折叠
    //-------------------------------------------------
    { "key": "ctrl+alt+u",            "command": "editor.unfold","when": "editorTextFocus" },
    { "key": "ctrl+alt+shift+u",      "command": "editor.unfoldAll","when": "editorTextFocus" },
    { "key": "ctrl+alt+f",            "command": "editor.fold","when": "editorTextFocus" },
    { "key": "ctrl+alt+shift+f",      "command": "editor.foldAll", "when": "editorTextFocus" },

    //-------------------------------------------------
    //书签
    //-------------------------------------------------
    {"key": "ctrl+alt+k",             "command": "bookmarks.toggle","when": "editorTextFocus"},
    {"key": "ctrl+alt+l",             "command": "bookmarks.jumpToNext","when": "editorTextFocus"},
    {"key": "ctrl+alt+j",             "command": "bookmarks.jumpToPrevious","when": "editorTextFocus"},
    {"key": "ctrl+alt+i",             "command": "bookmarks.list"},
    {"key": "ctrl+shift+alt+i",       "command": "bookmarks.listFromAllFiles"},

    {"key": "ctrl+alt+o",             "command": "bookmarks.clear"},
    {"key": "ctrl+shift+alt+o",       "command": "bookmarks.clearFromAllFiles"},

    //-------------------------------------------------
    //大小写
    //-------------------------------------------------
    { "key": "ctrl+shift+l",          "command": "editor.action.transformToLowercase" },
    { "key": "ctrl+shift+u",          "command": "editor.action.transformToUppercase"},

    //-------------------------------------------------
    //缩进
    //-------------------------------------------------
    { "key": "shift+tab",             "command": "outdent","when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus" },
    { "key": "tab",                   "command": "tab","when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus" },

    //-------------------------------------------------
    //编程
    //-------------------------------------------------
    { "key": "ctrl+alt+v",            "command": "editor.action.revealDefinition","when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"},
    { "key": "ctrl+alt+c",            "command": "references-view.find","when": "editorHasReferenceProvider"},
    { "key": "alt+v",                 "command": "editor.action.revealDefinition","when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"},
    { "key": "alt+c",                 "command": "references-view.find","when": "editorHasReferenceProvider"},
    { "key": "ctrl+alt+b",            "command": "gitlens.toggleFileBlame","when": "editorTextFocus"},
    { "key": "ctrl+alt+n",            "command": "gitlens.toggleLineBlame"},
    { "key": "ctrl+alt+m",            "command": "editor.action.toggleMinimap","when": "editorTextFocus"},
    { "key": "ctrl+g",                "command": "workbench.action.gotoLine"},

    { "key": "ctrl+shift+.",          "command": "breadcrumbs.focusAndSelect","when": "breadcrumbsPossible && breadcrumbsVisible"},
    { "key": "ctrl+alt+.",            "command": "breadcrumbs.focusAndSelect","when": "breadcrumbsPossible && breadcrumbsVisible"},
    { "key": "alt+.",                 "command": "breadcrumbs.focusNextWithPicker", "when": "breadcrumbsActive && breadcrumbsVisible && listFocus && !inputFocus && !treestickyScrollFocused"},
    { "key": "alt+,",                 "command": "breadcrumbs.focusPreviousWithPicker", "when": "breadcrumbsActive && breadcrumbsVisible && listFocus && !inputFocus && !treestickyScrollFocused"},

    //-------------------------------------------------
    //mode switch
    //-------------------------------------------------
    { "key": "ctrl+1",                "command": "workbench.action.focusFirstEditorGroup" },
    { "key": "ctrl+`",                "command": "workbench.action.terminal.toggleTerminal", "when": "terminal.active"},

    { "key": "ctrl+alt+p",            "command": "workbench.action.showCommands" },
    { "key": "ctrl+shift+p",          "command": "workbench.action.showCommands"},
    { "key": "ctrl+p",                "command": "-cursorUp","when": "textInputFocus"},
    { "key": "ctrl+p",                "command": "workbench.action.showCommands"},
    //-------------------------------------------------
    //terminal
    //-------------------------------------------------

    { "key": "ctrl+shift+c",          "command": "workbench.action.terminal.copySelection","when": "terminalFocus && terminalTextSelected" },
    { "key": "ctrl+shift+v",          "command": "workbench.action.terminal.paste","when": "terminalFocus" },

    { "key": "ctrl+l",                "command": "workbench.action.terminal.clear","when": "terminalFocus" },
    { "key": "ctrl+k",                "command": "workbench.action.terminal.clear","when": "terminalFocus" },
    { "key": "ctrl+\\",               "command": "workbench.action.terminal.split","when": "terminalFocus" },
    { "key": "ctrl+shift+n",          "command": "workbench.action.terminal.new","when": "terminalFocus" },
    { "key": "alt+q",                 "command": "workbench.action.terminal.kill","when": "terminalFocus" },
    { "key": "end",                   "command": "workbench.action.terminal.moveToLineEnd","when": "terminalFocus" },
    { "key": "home",                  "command": "workbench.action.terminal.moveToLineStart","when": "terminalFocus" },
    //alt + left or right move by word
    { "key": "ctrl+alt+m",            "command": "workbench.action.toggleMaximizedPanel","when": "terminalFocus"},
    { "key": "ctrl+alt+f12",          "command": "workbench.action.toggleMaximizedPanel","when": "terminalFocus"},


    //remove
    { "key": "alt+b","command": "-extension.openInDefaultBrowser"},
    { "key": "alt+b","command": "-gitlens.toggleFileBlame","when": "editorTextFocus && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /blameable/" },
    { "key": "ctrl+alt+c","command": "-extension.convertSelection","when": "editorTextFocus"},
    { "key": "ctrl+alt+c", "command": "-l13Diff.action.panel.compareAll", "when": "l13DiffFocus && !inputFocus && !l13DiffInputFocus && !l13DiffSearchFocus"},
    { "key": "ctrl+e", "command": "-workbench.action.quickOpen"},
    { "key": "alt+b", "command": "extension.openInDefaultBrowser"},
    { "key": "alt+=", "command": "-increaseSearchEditorContextLines", "when": "inSearchEditor"},
    { "key": "alt+a", "command": "-vscode-better-align.align", "when": "editorTextFocus"},
    { "key": "alt+a", "command": "-editor.action.accessibilityHelpConfigureAssignedKeybindings", "when": "accessibilityHelpIsShown && accessibleViewHasAssignedKeybindings"},
    { "key": "cmd+k o", "command": "-workbench.action.copyEditorToNewWindow", "when": "activeEditor" },
    { "key": "cmd+k shift+enter", "command": "-workbench.action.pinEditor", "when": "!activeEditorIsPinned" },
    { "key": "cmd+k shift+enter", "command": "-workbench.action.unpinEditor", "when": "activeEditorIsPinned" },
    { "key": "cmd+b", "command": "-workbench.action.toggleSidebarVisibility"},
    { "key": "ctrl+alt+/", "command": "-workbench.action.chat.run.prompt", "when": "chatIsEnabled && config.chat.promptFiles" },
    { "key": "ctrl+o", "command": "-lineBreakInsert", "when": "textInputFocus && !editorReadonly" },
    { "key": "ctrl+o", "command": "-java.action.showExtendedOutline", "when": "inQuickOpen && javaLSReady" }
]
posted @ 2019-03-21 23:04  fndefbwefsowpvqfx  阅读(968)  评论(0)    收藏  举报