Visual studio code快捷键
1 [ 2 //------------------------------------------------- 3 //查找 4 //------------------------------------------------- 5 //下一个查找结果 6 { "key": "ctrl+=", "command":"editor.action.moveSelectionToNextFindMatch","when":"editorFocus" }, 7 //上一个查找结果 8 { "key": "ctrl+-", "command": "editor.action.moveSelectionToPreviousFindMatch","when": "editorFocus" }, 9 10 //当前文件查找 11 { "key": "ctrl+f", "command": "actions.find"}, 12 13 //在当前文件中查找当前选中 14 { "key": "ctrl+e", "command": "actions.findWithSelection" }, 15 16 //文件夹中查找 17 { "key": "alt+f", "command": "workbench.view.search"}, 18 { "key": "alt+f", "command": "workbench.action.findInFiles","when": "!searchInputBoxFocus" }, 19 20 //------------------------------------------------- 21 //大小写 22 //------------------------------------------------- 23 { "key": "ctrl+shift+l", "command": "editor.action.transformToLowercase" }, 24 { "key": "ctrl+shift+u", "command": "editor.action.transformToUppercase"}, 25 26 //------------------------------------------------- 27 //窗口视图 28 //------------------------------------------------- 29 //上一视图 30 { "key": "alt+,", "command": "workbench.action.navigateBack" }, 31 //下一视图 32 { "key": "alt+.", "command": "workbench.action.navigateForward" }, 33 34 //上一tab页签 35 { "key": "ctrl+9", "command": "workbench.action.nextEditor" }, 36 //下一tab页签 37 { "key": "ctrl+0", "command": "workbench.action.previousEditor" }, 38 39 //切换全屏 40 { "key": "ctrl+alt+m","command": "workbench.action.toggleFullScreen" }, 41 42 //关闭当前tab页签 43 { "key": "ctrl+w","command": "workbench.action.closeActiveEditor" }, 44 { "key": "ctrl+w","command": "workbench.action.closeWindow","when": "!editorIsOpen" }, 45 46 //将当前tab页签分割 47 { "key": "ctrl+\\","command": "workbench.action.splitEditor" }, 48 { "key": "ctrl+shift+\\", "command": "workbench.action.toggleEditorGroupLayout" }, 49 50 //放大缩小 51 { "key": "alt+=", "command": "workbench.action.zoomIn" }, 52 { "key": "alt+-", "command": "workbench.action.zoomOut" }, 53 { "key": "alt+0", "command": "workbench.action.zoomReset" }, 54 55 { "key": "alt+e", "command": "workbench.view.explorer" }, 56 { "key": "alt+b", "command": "workbench.action.toggleSidebarVisibility" }, 57 58 //------------------------------------------------- 59 //行操作 60 //------------------------------------------------- 61 //本行下插入空白行 62 {"key": "ctrl+enter","command": "editor.action.insertLineAfter","when": "editorTextFocus && !editorReadonly"}, 63 //本行上插入空白行 64 {"key": "ctrl+shift+enter","command": "editor.action.insertLineBefore","when": "editorTextFocus && !editorReadonly"}, 65 66 //移动行 67 { "key": "alt+down","command": "editor.action.moveLinesDownAction","when": "editorTextFocus && !editorReadonly" }, 68 { "key": "alt+up","command": "editor.action.moveLinesUpAction", "when": "editorTextFocus && !editorReadonly" }, 69 70 //复制行 71 { "key": "shift+alt+down","command": "editor.action.copyLinesDownAction","when": "editorTextFocus && !editorReadonly" }, 72 { "key": "shift+alt+up","command": "editor.action.copyLinesUpAction","when": "editorTextFocus && !editorReadonly" }, 73 74 //合并行 75 { "key": "ctrl+j","command": "editor.action.joinLines", "when": "editorTextFocus && !editorReadonly" }, 76 77 //删除行 78 { "key": "ctrl+d","command": "editor.action.deleteLines", "when": "textInputFocus && !editorReadonly" }, 79 80 //是否折叠行 81 { "key": "alt+z","command": "editor.action.toggleWordWrap" }, 82 83 //------------------------------------------------- 84 //删除词 85 //------------------------------------------------- 86 { "key": "ctrl+backspace","command": "deleteWordLeft","when": "textInputFocus && !editorReadonly" }, 87 { "key": "ctrl+delete","command": "deleteWordRight","when": "textInputFocus && !editorReadonly" }, 88 89 //------------------------------------------------- 90 //书签 91 //------------------------------------------------- 92 {"key": "ctrl+alt+k","command": "bookmarks.toggle","when": "editorTextFocus"}, 93 94 {"key": "ctrl+alt+l","command": "bookmarks.jumpToNext","when": "editorTextFocus"}, 95 {"key": "ctrl+alt+j","command": "bookmarks.jumpToPrevious","when": "editorTextFocus"}, 96 97 {"key": "ctrl+alt+o","command": "bookmarks.clear"}, 98 {"key": "ctrl+shift+alt+o","command": "bookmarks.clearFromAllFiles"}, 99 100 {"key": "ctrl+alt+i","command": "bookmarks.list"}, 101 {"key": "ctrl+shift+alt+i","command": "bookmarks.listFromAllFiles"}, 102 103 //------------------------------------------------- 104 //文件操作 105 //------------------------------------------------- 106 //复制当前文件路径 107 { "key": "ctrl+k ctrl+p","command": "workbench.action.files.copyPathOfActiveFile" }, 108 109 //创建新文件 110 { "key": "ctrl+n","command": "workbench.action.files.newUntitledFile" }, 111 112 //打开文件 113 {"key": "ctrl+p","command": "workbench.action.quickOpen"}, 114 {"key": "ctrl+p","command": "workbench.action.quickOpenNavigateNextInFilePicker","when": "inFilesPicker && inQuickOpen"}, 115 116 //打开文件所在位置 117 { "key": "ctrl+k ctrl+r","command": "workbench.action.files.revealActiveFileInWindows" }, 118 119 //保存文件 120 { "key": "ctrl+s","command": "workbench.action.files.save" }, 121 { "key": "alt+ctrl+s","command": "workbench.action.files.saveAll" }, 122 { "key": "shift+ctrl+s","command": "workbench.action.files.saveAs" }, 123 124 //在新窗口打开当前文件 125 { "key": "ctrl+k ctrl+o","command": "workbench.action.files.showOpenedFileInNewWindow" }, 126 127 //------------------------------------------------- 128 //注释 129 //------------------------------------------------- 130 {"key": "ctrl+k ctrl+b","command": "editor.action.blockComment","when": "editorTextFocus && !editorReadonly"}, 131 {"key": "ctrl+k ctrl+l","command": "editor.action.commentLine","when": "editorTextFocus && !editorReadonly"}, 132 133 //------------------------------------------------- 134 //基本 135 //------------------------------------------------- 136 { "key": "ctrl+c","command": "editor.action.clipboardCopyAction","when": "textInputFocus"}, 137 { "key": "ctrl+v","command": "editor.action.clipboardPasteAction","when": "textInputFocus && !editorReadonly"}, 138 { "key": "ctrl+x","command": "editor.action.clipboardCutAction","when": "textInputFocus && !editorReadonly"}, 139 { "key": "ctrl+a","command": "editor.action.selectAll"}, 140 { "key": "ctrl+y","command": "redo","when": "textInputFocus && !editorReadonly"}, 141 { "key": "ctrl+z","command": "undo","when": "textInputFocus && !editorReadonly"}, 142 143 //------------------------------------------------- 144 //选择 145 //------------------------------------------------- 146 //括号选择 147 { "key": "ctrl+]","command": "editor.action.selectToBracket","when": "textInputFocus" }, 148 149 //匹配选择 150 {"key": "ctrl+shift+m","command": "editor.action.addSelectionToNextFindMatch","when": "editorFocus"}, 151 152 //字选择 153 { "key": "shift+down","command": "list.expandSelectionDown","when": "listFocus && !inputFocus" }, 154 { "key": "shift+up","command": "list.expandSelectionUp","when": "listFocus && !inputFocus" }, 155 { "key": "shift+left","command": "cursorLeftSelect","when": "textInputFocus" }, 156 { "key": "shift+right","command": "cursorRightSelect","when": "textInputFocus" }, 157 158 //行选择 159 { "key": "ctrl+i","command": "expandLineSelection","when": "textInputFocus"}, 160 161 //行选择 162 { "key": "shift+home","command": "cursorHomeSelect","when": "textInputFocus" }, 163 { "key": "shift+end","command": "cursorEndSelect","when": "textInputFocus" }, 164 165 //词选择 166 { "key": "alt+shift+right","command": "cursorWordEndRightSelect","when": "textInputFocus" }, 167 { "key": "alt+shift+left","command": "cursorWordStartLeftSelect","when": "textInputFocus" }, 168 169 //页选择 170 { "key": "shift+pageDown","command": "cursorPageDownSelect","when": "textInputFocus" }, 171 { "key": "shift+pageUp","command": "cursorPageUpSelect","when": "textInputFocus" }, 172 173 //------------------------------------------------- 174 //cursor 175 //------------------------------------------------- 176 //词 177 { "key": "alt+left","command": "cursorWordStartLeft","when": "textInputFocus" }, 178 { "key": "alt+right","command": "cursorWordEndRight", "when": "textInputFocus" }, 179 180 //行 181 { "key": "home","command": "cursorHome","when": "textInputFocus" }, 182 { "key": "end","command": "cursorEnd","when": "textInputFocus" }, 183 184 //页 185 { "key": "pageDown","command": "cursorPageDown","when": "textInputFocus" }, 186 { "key": "pageUp","command": "cursorPageUp","when": "textInputFocus" }, 187 188 //文件 189 { "key": "alt+home","command": "cursorTop","when": "textInputFocus" }, 190 { "key": "alt+end","command": "cursorBottom","when": "textInputFocus" }, 191 192 { "key": "ctrl+u","command": "cursorUndo","when": "textInputFocus" }, 193 194 { "key": "alt+pageDown", "command": "scrollLineDown","when": "textInputFocus" }, 195 { "key": "alt+pageUp", "command": "scrollLineUp","when": "textInputFocus" }, 196 197 //------------------------------------------------- 198 //列编辑 199 //------------------------------------------------- 200 //alt +鼠标左键单击 201 //按住鼠标中键拖拽 202 { "key": "ctrl+shift+alt+up","command": "editor.action.insertCursorAbove","when": "editorTextFocus" }, 203 { "key": "ctrl+shift+alt+down","command": "editor.action.insertCursorBelow","when": "editorTextFocus" }, 204 205 //------------------------------------------------- 206 //折叠 207 //------------------------------------------------- 208 { "key": "alt+u","command": "editor.unfold","when": "editorTextFocus" }, 209 { "key": "alt+shift+u","command": "editor.unfoldAll","when": "editorTextFocus" }, 210 { "key": "ctrl+alt+f","command": "editor.fold","when": "editorTextFocus" }, 211 { "key": "ctrl+alt+shift+f","command": "editor.foldAll", "when": "editorTextFocus" }, 212 213 //------------------------------------------------- 214 //缩进 215 //------------------------------------------------- 216 { "key": "shift+tab","command": "outdent","when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus" }, 217 { "key": "tab","command": "tab","when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus" }, 218 219 //------------------------------------------------- 220 //terminal 221 //------------------------------------------------- 222 { "key": "ctrl+shift+c","command": "workbench.action.terminal.copySelection","when": "terminalFocus && terminalTextSelected" }, 223 { "key": "ctrl+shift+v","command": "workbench.action.terminal.paste","when": "terminalFocus" }, 224 // { "key": "ctrl+a","command": "workbench.action.terminal.selectAll","when": "terminalFocus" }, 225 { "key": "ctrl+l","command": "workbench.action.terminal.clear","when": "terminalFocus" }, 226 { "key": "ctrl+\\","command": "workbench.action.terminal.split","when": "terminalFocus" }, 227 { "key": "end", "command": "workbench.action.terminal.moveToLineEnd","when": "terminalFocus" }, 228 { "key": "home","command": "workbench.action.terminal.moveToLineStart","when": "terminalFocus" }, 229 //alt + left or right move by word 230 { "key": "ctrl+f","command": "workbench.action.terminal.focusFindWidget","when": "terminalFocus" }, 231 { "key": "ctrl+n","command": "workbench.action.terminal.findNext","when": "terminalFindWidgetFocused" }, 232 { "key": "ctrl+shift+n","command": "workbench.action.terminal.findPrevious","when": "terminalFindWidgetFocused" }, 233 { "key": "alt+backspace","command": "workbench.action.terminal.deleteWordLeft","when": "terminalFocus" }, 234 { "key": "alt+delete","command": "workbench.action.terminal.deleteWordRight","when": "terminalFocus" }, 235 { "key": "ctrl+1","command": "workbench.action.terminal.focusAtIndex1","when": "terminalFocus" }, 236 { "key": "ctrl+2","command": "workbench.action.terminal.focusAtIndex2","when": "terminalFocus" }, 237 { "key": "ctrl+3","command": "workbench.action.terminal.focusAtIndex3","when": "terminalFocus" }, 238 { "key": "ctrl+4","command": "workbench.action.terminal.focusAtIndex4","when": "terminalFocus" }, 239 { "key": "ctrl+5","command": "workbench.action.terminal.focusAtIndex5","when": "terminalFocus" }, 240 { "key": "ctrl+6","command": "workbench.action.terminal.focusAtIndex6","when": "terminalFocus" }, 241 { "key": "ctrl+7","command": "workbench.action.terminal.focusAtIndex7","when": "terminalFocus" }, 242 { "key": "ctrl+alt+m","command": "workbench.action.toggleMaximizedPanel","when": "terminalFocus"}, 243 244 //------------------------------------------------- 245 //编程 246 //------------------------------------------------- 247 { "key": "ctrl+alt+v","command": "editor.action.revealDefinition","when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"}, 248 { "key": "ctrl+alt+c","command": "references-view.find","when": "editorHasReferenceProvider"}, 249 { "key": "ctrl+g","command": "workbench.action.gotoLine"}, 250 { "key": "ctrl+alt+b","command": "gitlens.toggleFileBlame","when": "editorTextFocus"}, 251 { "key": "ctrl+alt+n","command": "gitlens.toggleLineBlame"}, 252 {"key": "ctrl+oem_minus","command": "-workbench.action.zoomOut"} 253 ]