Im ersten Teil der Serie zu Microsoft Visual Studio Code haben wir uns die Abgrenzung zu Integrated Development Enviorenments wie Visual Studio auf der einen Seite und zu Editoren wie Sublime auf der anderen angeschaut. Ich wollte an einer zentralen Stelle alle Microsoft Visual Studio Code Keyboard Shortcuts ablegen. Ich werde die meisten davon in den kommenden Blogposts erklären. Und darauf eingehen.

Editor Basics

Diese liste beschreibt die Keyboard Shortcuts die für alle Basissprachen implementiert sind.

KeyCommandCommand idCtrl+XCut line (empty selection)editor.action.clipboardCutActionCtrl+CCopy line (empty selection)editor.action.clipboardCopyActionShift+DeleteCut lineeditor.action.cutLinesCtrl+Shift+KDelete Lineeditor.action.deleteLinesCtrl+EnterInsert Line Beloweditor.action.insertLineAfterCtrl+Shift+EnterInsert Line Aboveeditor.action.insertLineBeforeAlt+DownMove Line Downeditor.action.moveLinesDownActionAlt+UpMove Line Upeditor.action.moveLinesUpActionShift+Alt+DownCopy Line Downeditor.action.copyLinesDownActionShift+Alt+UpCopy Line Upeditor.action.copyLinesUpActionCtrl+Shift+LSelect all occurrences of current selectioneditor.action.selectHighlightsCtrl+F2Select all occurrences of current wordeditor.action.changeAllCtrl+Alt+DownInsert Cursor Beloweditor.action.insertCursorBelowCtrl+Alt+UpInsert Cursor Aboveeditor.action.insertCursorAboveCtrl+Alt+]Jump to matching bracketeditor.action.jumpToBracketCtrl+]Indent Lineeditor.action.indentLinesCtrl+[Outdent Lineeditor.action.outdentLinesHomeGo to Beginning of LinecursorHomeEndGo to End of LinecursorEndCtrl+EndGo to End of FilecursorBottomCtrl+HomeGo to Beginning of FilecursorTopCtrl+/Toggle Line Commenteditor.action.commentLineShift+Alt+AToggle Block Commenteditor.action.blockCommentCtrl+FFindactions.findCtrl+HReplaceeditor.action.startFindReplaceActionF3Find Nexteditor.action.nextMatchFindActionShift+F3Find Previouseditor.action.previousMatchFindActionCtrl+MToggle Use of Tab Key for Setting Focuseditor.action.toggleTabFocusMode

Editor Advanced

Derzeit unterstützen wir hier JavaScript und TypeScript. Für C# kann man die Rich Editing Experience auf eigene Gefahr aktivieren. Sie steht derzeit versteckt zur Verfügung. Um die Editor Experience in C# zu unterstützen gehen Sie folgt vor.

Microsoft Visual Studio Code User Settings: Menu - File - Preferences - User Settings

In der kopie der "settings.json" Datei fügen Sie folgenden Code hinzu:

{ "csharp.codeActions" : true }

Nun stehen Ihnen die erweiterten Bearbeitungsmethoden der Roslyn API zur Verfügung. Diese C# Extension sind noch nicht stabil und werden in einer zukünftigen Version von Microsoft Visual Studio Code automatisch geupdated werden.

KeyCommandCommand idCtrl+SpaceTrigger Suggesteditor.action.triggerSuggestCtrl+Alt+FFormat Codeeditor.action.formatCtrl+F12Go to Definitioneditor.action.goToDeclarationAlt+F12Peek Definitioneditor.action.previewDeclarationCtrl+.Quick Fixeditor.action.quickFixShift+F12Show Referenceseditor.action.referenceSearch.triggerF2Rename Symboleditor.action.renameCtrl+DownReplace with Next Valueeditor.action.inPlaceReplace.downCtrl+UpReplace with Previous Valueeditor.action.inPlaceReplace.upShift+Alt+RightExpand AST Selecteditor.action.smartSelect.growShift+Alt+LeftShrink AST Selecteditor.action.smartSelect.shrink

KeyCommandCommand idCtrl+TShow All Symbolsworkbench.action.showAllSymbolsCtrl+GGo to Line...workbench.action.gotoLineCtrl+EGo to File...workbench.action.quickOpenCtrl+Shift+OGo to Symbol...workbench.action.gotoSymbolCtrl+Shift+MShow Errors and Warningsworkbench.action.showErrorsWarningsF8Go to Next Error or Warningeditor.action.marker.nextShift+F8Go to Previous Error or Warningeditor.action.marker.prevCtrl+Shift+PShow All Commandsworkbench.action.showCommandsCtrl+TabNavigate Historyworkbench.action.openPreviousEditorAlt+LeftGo Backworkbench.action.navigateBackAlt+RightGo Forwardworkbench.action.navigateForward

Editor Fenster

KeyCommandCommand idCtrl+Shift+NNew Windowworkbench.action.newWindowCtrl+Shift+WClose Windowworkbench.action.closeWindowCtrl+WClose Editorworkbench.action.closeActiveEditorCtrl+`Cycle Between Opened Editorsworkbench.action.cycleEditorCtrl+\Split Editorworkbench.action.splitEditorCtrl+1Focus into Left Hand Editorworkbench.action.focusFirstEditorCtrl+2Focus into Side Editorworkbench.action.focusSecondEditorCtrl+3Focus into Right Hand Editorworkbench.action.focusThirdEditorCtrl+Alt+LeftFocus into Next Editor on the Leftworkbench.action.focusLeftEditorCtrl+Alt+RightFocus into Next Editor on the Rightworkbench.action.focusRightEditor

Datei Management

KeyCommandCommand idCtrl+NNew Fileworkbench.action.files.newUntitledFileCtrl+Alt+OOpen File...workbench.action.files.openFileCtrl+SSaveworkbench.action.files.saveCtrl+Shift+SSave Allworkbench.action.files.saveAllCtrl+Alt+SSave As...workbench.action.files.saveAs

Ansicht und weitere Fenster

KeyCommandCommand idF11Toggle Full Screenworkbench.action.toggleFullScreenCtrl+=Zoom inworkbench.action.zoomInCtrl+-Zoom outworkbench.action.zoomOutCtrl+BToggle Sidebar Visibilityworkbench.action.toggleSidebarVisibilityCtrl+Shift+DShow Debugworkbench.view.debugCtrl+Shift+EShow Explorerworkbench.view.explorerCtrl+Shift+FShow Searchworkbench.view.searchCtrl+Shift+JToggle Search Detailsworkbench.action.search.toggleQueryDetailsCtrl+Shift+COpen New Consoleworkbench.action.terminal.openNativeConsoleCtrl+Shift+UShow Outputworkbench.action.output.showOutputCtrl+U LShow OmniSharp Logomnisharp.show.generalLogCtrl+U Ctrl+LShow OmniSharp Log to the Sideomnisharp.show.generalLogOnSideCtrl+Shift+VToggle Markdown Previewworkbench.action.markdown.togglePreview

Debugging Shortcuts

KeyCommandCommand idF9Toggle Breakpointeditor.debug.action.toggleBreakpointF5Continueworkbench.action.debug.playF5Pauseworkbench.action.debug.startF11Step Intoworkbench.action.debug.stepIntoShift+F11Step Outworkbench.action.debug.stepOutF10Step Overworkbench.action.debug.stepOverShift+F5Stopworkbench.action.debug.stop

Tasks

KeyCommandCommand idCtrl+Shift+BRun Build Taskworkbench.action.tasks.buildCtrl+Shift+TRun Test Taskworkbench.action.tasks.test