Tổng hợp phím tắt của Visual Studio Code

Mình mới sử dụng VS Code của Microsoft được vài tuần, cảm thấy cũng khá thích - trừ cái việc nó hay chậm chậm. Lý do cũng có thể dễ lý giải là do nó được viết bằng Nodejs, chạy trên khung V8 của Chrome. Một cách tiếp cận phải nói là khá là hay, giúp sản phẩm nhanh chóng đến tay người dùng, thứ 2 là tính đa nền tảng của nó.
Mình xin tổng hợp lại một số phím tắt hay, hay dùng của VS Code.



Shortcuts - Basic Editing

KeyCommandCommand id
Ctrl+Shift+KDelete Lineeditor.action.deleteLines
Ctrl+EnterInsert Line Beloweditor.action.insertLineAfter
Ctrl+Shift+EnterInsert Line Aboveeditor.action.insertLineBefore
Ctrl+DownMove Line Downeditor.action.moveLinesDownAction
Ctrl+UpMove Line Upeditor.action.moveLinesUpAction
Ctrl+Shift+Alt+DownCopy Line Downeditor.action.copyLinesDownAction
Ctrl+Shift+Alt+UpCopy Line Upeditor.action.copyLinesUpAction
Ctrl+DAdd Selection To Next Find Matcheditor.action.addSelectionToNextFindMatch
Ctrl+K Ctrl+DMove Last Selection To Next Find Matcheditor.action.moveSelectionToNextFindMatch
Ctrl+UUndo last cursor operationcursorUndo
Ctrl+Shift+LSelect all occurrences of current selectioneditor.action.selectHighlights
Ctrl+F2Select all occurrences of current wordeditor.action.changeAll
Ctrl+Meta+DownInsert Cursor Beloweditor.action.insertCursorBelow
Ctrl+Meta+UpInsert Cursor Aboveeditor.action.insertCursorAbove
Ctrl+Shift+]Jump to matching bracketeditor.action.jumpToBracket
Ctrl+]Indent Lineeditor.action.indentLines
Ctrl+[Outdent Lineeditor.action.outdentLines
HomeGo to Beginning of LinecursorHome
EndGo to End of LinecursorEnd
Ctrl+EndGo to End of FilecursorBottom
Ctrl+HomeGo to Beginning of FilecursorTop
Ctrl+K Ctrl+CAdd Line Commenteditor.action.addCommentLine
Ctrl+K Ctrl+URemove Line Commenteditor.action.removeCommentLine
Ctrl+/Toggle Line Commenteditor.action.commentLine
Ctrl+Shift+AToggle Block Commenteditor.action.blockComment
Ctrl+FFindactions.find
Ctrl+HReplaceeditor.action.startFindReplaceAction
F3Find Nexteditor.action.nextMatchFindAction
Shift+F3Find Previouseditor.action.previousMatchFindAction
Ctrl+MToggle Use of Tab Key for Setting Focuseditor.action.toggleTabFocusMode

Shortcuts - Rich Languages Editing


KeyCommandCommand id
Ctrl+SpaceTrigger Suggesteditor.action.triggerSuggest
Ctrl+Shift+IFormat Codeeditor.action.format
F12Go to Definitioneditor.action.goToDeclaration
Ctrl+Shift+F10Peek Definitioneditor.action.previewDeclaration
Ctrl+.Quick Fixeditor.action.quickFix
Shift+F12Show Referenceseditor.action.referenceSearch.trigger
F2Rename Symboleditor.action.rename
Ctrl+Shift+.Replace with Next Valueeditor.action.inPlaceReplace.down
Ctrl+Shift+,Replace with Previous Valueeditor.action.inPlaceReplace.up
Shift+Alt+RightExpand AST Selecteditor.action.smartSelect.grow
Shift+Alt+LeftShrink AST Selecteditor.action.smartSelect.shrink

Shortcuts - Navigation

KeyCommandCommand id
Ctrl+TShow All Symbolsworkbench.action.showAllSymbols
Ctrl+GGo to Line...workbench.action.gotoLine
Ctrl+PGo to File...workbench.action.quickOpen
Ctrl+Shift+OGo to Symbol...workbench.action.gotoSymbol
Ctrl+Shift+MShow Errors and Warningsworkbench.action.showErrorsWarnings
F8Go to Next Error or Warningeditor.action.marker.next
Shift+F8Go to Previous Error or Warningeditor.action.marker.prev
Ctrl+Shift+PShow All Commandsworkbench.action.showCommands
Ctrl+TabNavigate Historyworkbench.action.openPreviousEditor
Ctrl+Alt+-Go Backworkbench.action.navigateBack
Ctrl+Shift+-Go Forwardworkbench.action.navigateForward

Shortcuts - Editor/Window Management

KeyCommandCommand id
Ctrl+Shift+NNew Windowworkbench.action.newWindow
Ctrl+Shift+WClose Windowworkbench.action.closeWindow
Ctrl+WClose Editorworkbench.action.closeActiveEditor
Ctrl+`Cycle Between Opened Editorsworkbench.action.cycleEditor
Ctrl+\Split Editorworkbench.action.splitEditor
Ctrl+1Focus into Left Hand Editorworkbench.action.focusFirstEditor
Ctrl+2Focus into Side Editorworkbench.action.focusSecondEditor
Ctrl+3Focus into Right Hand Editorworkbench.action.focusThirdEditor
Ctrl+Shift+Alt+LeftFocus into Next Editor on the Leftworkbench.action.focusLeftEditor
Ctrl+Shift+Alt+RightFocus into Next Editor on the Rightworkbench.action.focusRightEditor

Shortcuts - File Management

KeyCommandCommand id
Ctrl+NNew Fileworkbench.action.files.newUntitledFile
Ctrl+OOpen File...workbench.action.files.openFile
Ctrl+SSaveworkbench.action.files.save
unassignedSave Allworkbench.action.files.saveAll
Ctrl+Shift+SSave As...workbench.action.files.saveAs

Shortcuts - Display

KeyCommandCommand id
F11Toggle Full Screenworkbench.action.toggleFullScreen
Ctrl+=Zoom inworkbench.action.zoomIn
Ctrl+-Zoom outworkbench.action.zoomOut
Ctrl+BToggle Sidebar Visibilityworkbench.action.toggleSidebarVisibility
Ctrl+Shift+DShow Debugworkbench.view.debug
Ctrl+Shift+EShow Explorerworkbench.view.explorer
Ctrl+Shift+FShow Searchworkbench.view.search
Ctrl+Shift+JToggle Search Detailsworkbench.action.search.toggleQueryDetails
Ctrl+Shift+COpen New Consoleworkbench.action.terminal.openNativeConsole
Ctrl+Shift+UShow Outputworkbench.action.output.showOutput
Ctrl+L LShow OmniSharp Logomnisharp.show.generalLog
Ctrl+L Ctrl+LShow OmniSharp Log to the Sideomnisharp.show.generalLogOnSide
Ctrl+Shift+VToggle Markdown Previewworkbench.action.markdown.togglePreview

Shortcuts - Debug

KeyCommandCommand id
F9Toggle Breakpointeditor.debug.action.toggleBreakpoint
F5Continueworkbench.action.debug.play
F5Pauseworkbench.action.debug.start
F11Step Intoworkbench.action.debug.stepInto
Shift+F11Step Outworkbench.action.debug.stepOut
F10Step Overworkbench.action.debug.stepOver
Shift+F5Stopworkbench.action.debug.stop

Shortcuts - Tasks

KeyCommandCommand id
Ctrl+Shift+BRun Build Taskworkbench.action.tasks.build
Ctrl+Shift+TRun Test Taskworkbench.action.tasks.test

Related