Cheat Sheet Visual Studio Code



Cheat Sheet 4: Visual Studio This cheat sheet is also from Visual Studio like the first however this cheat sheet is designed for Linux users! Keep it on hand when you are working in VS Code. Print it and pin it to the wall behind the monitor. Cheat Sheet for Visual Studio Code. We've created a handy cheat sheet with keyboard shortcuts and some tips & tricks for VS Code. Download it for free! Yes, I want the free newsletter that's loved by over 100,000 developers and designers. It's free, it's sent once a. Visual Studio Code Cheat Sheet. Visual Studio Code, or VSCode, is an open-source code editor. This guide targets VSCode v1.19. Table of contents. References Shortcuts Debug Shortcuts View Shortcuts Panel Shortcuts Search Shortcuts Sidebars Shortcuts Command palette; Shortcuts. Markdown cheat sheet for Visual Studio Code. Posted on 2020-11-01 by HP. Here is a cheat sheet that I found somewhere that will work with Visual Studio Code MD files. Cheat Sheet for Visual Studio Code. We've created a handy cheat sheet with keyboard shortcuts and some tips & tricks for VS Code. Download it for free!

General

SHIFT+CMD+P, F1

CMD+P

SHIFT+CMD+N

CMD+W

CMD+,

CMD+K CMD+S

Basic Editing

CMD+X

editor.action.clipboardCutAction

CMD+C

editor.action.clipboardCopyAction

CMD+V

editor.action.clipboardPasteAction

SHIFT+CMD+K

editor.action.deleteLines

CMD+Enter

editor.action.insertLineAfter

SHIFT+CMD+Enter

editor.action.insertLineBefore

OPTION+↓

editor.action.moveLinesDownAction

OPTION+↑

editor.action.moveLinesUpAction

SHIFT+OPTION+↓

editor.action.copyLinesDownAction

SHIFT+OPTION+↑

editor.action.copyLinesUpAction

CMD+Z

undo

SHIFT+CMD+Z

redo

CMD+D

editor.action.addSelectionToNextFindMatch

CMD+K CMD+D

editor.action.moveSelectionToNextFindMatch

CMD+U

cursorUndo

SHIFT+OPTION+I

editor.action.insertCursorAtEndOfEachLineSelected

SHIFT+CMD+L

editor.action.selectHighlights

CMD+F2

editor.action.changeAll

CMD+L

expandLineSelection

OPTION+CMD+↓

editor.action.insertCursorBelow

OPTION+CMD+↑

editor.action.insertCursorAbove

SHIFT+CMD+

editor.action.jumpToBracket

CMD+]

editor.action.indentLines

CMD+[

editor.action.outdentLines

Home

cursorHome

End

cursorEnd

CMD+↓

cursorBottom

CMD+↑

cursorTop

CTRL+PageDown

scrollLineDown

CTRL+PageUp

scrollLineUp

CMD+PageDown

scrollPageDown

CMD+PageUp

scrollPageUp

OPTION+CMD+[

editor.fold

OPTION+CMD+]

editor.unfold

CMD+K CMD+[

editor.foldRecursively

CMD+K CMD+]

editor.unfoldRecursively

CMD+K CMD+0

editor.foldAll

CMD+K CMD+J

editor.unfoldAll

CMD+K CMD+C

editor.action.addCommentLine

CMD+K CMD+U

editor.action.removeCommentLine

CMD+/

editor.action.commentLine

SHIFT+OPTION+A Cool mac games to download.

editor.action.blockComment

CMD+F

actions.find

OPTION+CMD+F

editor.action.startFindReplaceAction

Enter

editor.action.nextMatchFindAction

SHIFT+Enter

editor.action.previousMatchFindAction

OPTION+Enter

editor.action.selectAllMatches

OPTION+CMD+C

toggleFindCaseSensitive

OPTION+CMD+R

toggleFindRegex

OPTION+CMD+W

toggleFindWholeWord

CTRL+SHIFT+M

editor.action.toggleTabFocusMode

unassigned

toggleRenderWhitespace

OPTION+Z

editor.action.toggleWordWrap

Rich Languages Editing

Visual Studio Code Python Cheat Sheet

CTRL+Space

editor.action.triggerSuggest

SHIFT+CMD+Space

editor.action.triggerParameterHints

SHIFT+OPTION+F

editor.action.formatDocument

CMD+K CMD+F

editor.action.formatSelection

F12

editor.action.revealDefinition

CMD+K CMD+I

editor.action.showHover

OPTION+F12

editor.action.peekDefinition

CMD+K F12

editor.action.revealDefinitionAside

CMD+.

editor.action.quickFix

SHIFT+F12

editor.action.goToReferences

F2

Dead cells download mac. editor.action.rename

SHIFT+CMD+.

editor.action.inPlaceReplace.down

SHIFT+CMD+,

editor.action.inPlaceReplace.up

CTRL+SHIFT+CMD+→

editor.action.smartSelect.expand

CTRL+SHIFT+CMD+←

editor.action.smartSelect.shrink

CMD+K CMD+X

editor.action.trimTrailingWhitespace

CMD+K M

workbench.action.editor.changeLanguageMode

Navigation

CMD+T

workbench.action.showAllSymbols

CTRL+G

workbench.action.gotoLine

CMD+P

workbench.action.quickOpen

SHIFT+CMD+O

workbench.action.gotoSymbol

SHIFT+CMD+M

workbench.actions.view.problems

F8

editor.action.marker.nextInFiles

SHIFT+F8

editor.action.marker.prevInFiles

SHIFT+CMD+P or F1

workbench.action.showCommands

CTRL+Tab

workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup

CTRL+-

workbench.action.navigateBack

CTRL+-

workbench.action.quickInputBack

CTRL+SHIFT+-

workbench.action.navigateForward

Editor/Window Management

SHIFT+CMD+N

workbench.action.newWindow

CMD+W

workbench.action.closeWindow

CMD+W

workbench.action.closeActiveEditor

CMD+K F

workbench.action.closeFolder

unassigned

workbench.action.navigateEditorGroups

CMD+

workbench.action.splitEditor

CMD+1

workbench.action.focusFirstEditorGroup

CMD+2

workbench.action.focusSecondEditorGroup

CMD+3

workbench.action.focusThirdEditorGroup

unassigned

workbench.action.focusPreviousGroup

unassigned

workbench.action.focusNextGroup

CMD+K SHIFT+CMD+←

workbench.action.moveEditorLeftInGroup

CMD+K SHIFT+CMD+→

workbench.action.moveEditorRightInGroup

CMD+K ←

workbench.action.moveActiveEditorGroupLeft

CMD+K →

workbench.action.moveActiveEditorGroupRight

CTRL+CMD+→

workbench.action.moveEditorToNextGroup

CTRL+CMD+←

workbench.action.moveEditorToPreviousGroup

File Management

CMD+N

workbench.action.files.newUntitledFile

unassigned

workbench.action.files.openFile

CMD+S

workbench.action.files.save

OPTION+CMD+S

workbench.action.files.saveAll

SHIFT+CMD+S

workbench.action.files.saveAs

CMD+W

workbench.action.closeActiveEditor

OPTION+CMD+T

workbench.action.closeOtherEditors

CMD+K W

workbench.action.closeEditorsInGroup

unassigned

workbench.action.closeEditorsInOtherGroups

unassigned Batch pdf merger.

workbench.action.closeEditorsToTheLeft

unassigned

workbench.action.closeEditorsToTheRight

CMD+K CMD+W

workbench.action.closeAllEditors

SHIFT+CMD+T

workbench.action.reopenClosedEditor

CMD+K Enter

workbench.action.keepEditor

CMD+K P

workbench.action.files.copyPathOfActiveFile

CMD+K R

workbench.action.files.revealActiveFileInWindows

CMD+K O

workbench.action.files.showOpenedFileInNewWindow

unassigned

workbench.files.action.compareFileWith

Display

CTRL+CMD+F

workbench.action.toggleFullScreen

CMD+K Z

workbench.action.toggleZenMode

Escape Escape

workbench.action.exitZenMode

CMD+=

workbench.action.zoomIn

CMD+-

workbench.action.zoomOut

CMD+Numpad0

workbench.action.zoomReset

CMD+B

workbench.action.toggleSidebarVisibility

SHIFT+CMD+E

workbench.view.explorer

SHIFT+CMD+F

workbench.view.search

CTRL+SHIFT+G

workbench.view.scm

SHIFT+CMD+D

workbench.view.debug

SHIFT+CMD+X

workbench.view.extensions

SHIFT+CMD+U

workbench.action.output.toggleOutput

CTRL+Q

workbench.action.quickOpenView

SHIFT+CMD+C

workbench.action.terminal.openNativeConsole

SHIFT+CMD+V

markdown.showPreview

CMD+K V

markdown.showPreviewToSide

CTRL+`

workbench.action.terminal.toggleTerminal

Visual studio code git cheat sheet

Search

SHIFT+CMD+F

workbench.view.search

SHIFT+CMD+H

workbench.action.replaceInFiles

OPTION+CMD+C

toggleSearchCaseSensitive

OPTION+CMD+W

toggleSearchWholeWord

OPTION+CMD+R

toggleSearchRegex

SHIFT+CMD+J

workbench.action.search.toggleQueryDetails

F4

search.action.focusNextSearchResult

SHIFT+F4

search.action.focusPreviousSearchResult

history.showNext

history.showPrevious

Search Editor

CMD+Enter

search.action.openInEditor

Escape

search.action.focusQueryEditorWidget

SHIFT+CMD+R

rerunSearchEditorSearch

SHIFT+CMD+Backspace

search.searchEditor.action.deleteFileResults

Preferences

CMD+,

workbench.action.openSettings

unassigned

workbench.action.openWorkspaceSettings

CMD+K CMD+S

workbench.action.openGlobalKeybindings

unassigned

workbench.action.openSnippets

CMD+K CMD+T

workbench.action.selectTheme

unassigned

workbench.action.configureLocale

Debug

F9

editor.debug.action.toggleBreakpoint

F5

workbench.action.debug.start

F5

workbench.action.debug.continue

CTRL+F5

workbench.action.debug.run

F6

workbench.action.debug.pause

F11

workbench.action.debug.stepInto

Tasks

SHIFT+CMD+B

workbench.action.tasks.build

unassigned

workbench.action.tasks.test

Extensions

unassigned

workbench.extensions.action.installExtension

unassigned

workbench.extensions.action.showInstalledExtensions

unassigned

workbench.extensions.action.listOutdatedExtensions

unassigned

workbench.extensions.action.showRecommendedExtensions

unassigned

workbench.extensions.action.showPopularExtensions

unassigned

workbench.extensions.action.updateAllExtensions

Cheat Sheet Visual Studio Code

Notes

  • Some commands included below do not have default keyboard shortcuts and so are displayed as unassigned but you can assign your own keybindings.
  • More information at https://code.visualstudio.com/docs/getstarted/keybindings#_default-keyboard-shortcuts

Visual Studio Code Shortcuts

This is my personal cheat sheet for Microsoft Visual Studio Code (VS Code). Mainly, this is to record little commands and things that I am constantly forgetting (especially unique ones related to the unique plugins I use).

Keyboard shortcuts for Windows

General

ActionKey(s)
Show Command PaletteCTRL + SHIFT + P, F1
Quick Open, Go to File…CTRL + P
New window/instanceCTRL + SHIFT + N
Close window/instanceCTRL + SHIFT + W
User SettingsCTRL + ,
Keyboard ShortcutsCTRL + KCTRL + S

Basic editing

ActionKey(s)
Cut line (empty selection)Ctrl + X
Copy line (empty selection)Ctrl + C
Move line up/downAlt + /
Copy line up/downShift + Alt + /
Delete lineCtrl + Shift + K
Insert line belowCtrl + Enter
Insert line aboveCtrl + Shift + Enter
Jump to matching bracketCtrl + Shift +
Indent/outdent lineCtrl + ] / [
Go to beginning/end of lineHome / End
Go to beginning of fileCtrl + Home
Go to end of fileCtrl + End
Scroll line up/downCtrl + /
Scroll page up/downAlt + PgUp / PgDn
Fold (collapse) regionCtrl + Shift + [
Unfold (uncollapse) regionCtrl + Shift + ]
Fold (collapse) all subregionsCtrl + KCtrl + [
Unfold (uncollapse) all subregionsCtrl + KCtrl + ]
Fold (collapse) all regionsCtrl + KCtrl + 0
Unfold (uncollapse) all regionsCtrl + KCtrl + J
Add line commentCtrl + KCtrl + C
Remove line commentCtrl + KCtrl + U
Toggle line commentCtrl + /
Toggle block commentShift + Alt + A
Toggle word wrapAlt + Z

Navigation

ActionKey(s)
Show all SymbolsCTRL + T
Go to Line..CTRL + G
Go to File..CTRL + P
Go to Symbol..CTRL + SHIFT + O
Show Problems panelCTRL + SHIFT + M
Go to next error or warningF8
Go to previous error or warningSHIFT + F8
Navigate editor group historyCTRL + SHIFT + TAB
Go back / forwardALT + /
Toggle Tab moves focusCTRL + M

Node Js Downloads

Search and replace

ActionKey(s)
FindCTRL + F
ReplaceCTRL + H
Find next/previousF3 / SHIFT + F3
Select all occurences of Find matchALT + ENTER
Add selection to next Find matchCTRL + D
Move last selection to next Find matchCTRL + K CTRL + D
Toggle case-sensitive / regex / whole wordALT + C / R / W

Visual Studio Code Markdown Cheat Sheet

Multi-cursor and selection

ActionKey(s)
Insert cursorALT + Click
Insert cursor above / belowCTRL + ALT + /
Undo last cursor operationCTRL + U
Insert cursor at end of each line selectedSHIFT + ALT + I
Select current lineCTRL + L
Select all occurrences of current selectionCTRL + SHIFT + L
Select all occurrences of current wordCTRL + F2
Expand selectionSHIFT + ALT +
Shrink selectionSHIFT + ALT +
Column (box) selectionSHIFT + ALT + (drag mouse)
Column (box) selectionCTRL + SHIFT + ALT + (arrow key)
Column (box) selection page up/downCTRL + SHIFT + ALT + PgUp / PgDn

Rich languages editing

ActionKey(s)
Trigger suggestionCTRL + SPACE
Trigger parameter hintsCTRL + SHIFT + SPACE
Format documentSHIFT + ALT + F
Format selectionCTRL + K CTRL + F
Go to DefinitionF12
Peek DefinitionALT + F12
Open Definition to the sideCTRL + KF12
Quick FixCTRL + .
Show ReferencesSHIFT + F12
Rename SymbolF2
Trim trailing whitespaceCTRL + KCTRL + X
Change file languageCTRL + KM

Editor management

ActionKey(s)
Close editorCTRL + F4, CTRL +
Close folderCTRL + KF
Split editorCTRL +
Focus into 1st, 2nd or 3rd editor groupCTRL + 1 / 2 / 3
Focus into previous/next editor groupCTRL + K CTRL + /
Move editor left/rightCTRL + SHIFT + PgUp / PgDn
Move active editor groupCTRL + K /

File management

ActionKey(s)
New FileCTRL + N
Open File..CTRL + O
SaveCTRL + S
Save As..CTRL + SHIFT + S
Save AllCTRL + K S
CloseCTRL + F4
Close AllCTRL + KCTRL + W
Reopen closed editorCTRL + SHIFT + T
Enter Keep preview mode editor openCTRL + K
Open nextCTRL + Tab
Open previousCTRL + SHIFT + Tab
Copy path of active fileCTRL + K P
Reveal active file in ExplorerCTRL + K R
Show active file in new window/instanceCTRL + K O

Display

ActionKey(s)
Toggle full screenF11
Toggle editor layout (horizontal/vertical)SHIFT + ALT + 0
Zoom in/outCTRL + = / -
Toggle Sidebar visibilityCTRL + B
Show Explorer / Toggle focusCTRL + SHIFT + E
Show SearchCTRL + SHIFT + F
Show Source ControlCTRL + SHIFT + G
Show DebugCTRL + SHIFT + D
Show ExtensionsCTRL + SHIFT + X
Replace in filesCTRL + SHIFT + H
Toggle Search detailsCTRL + SHIFT + J
Show Output panelCTRL + SHIFT + U
Open Markdown previewCTRL + SHIFT + V
Open Markdown preview to the sideCTRL + K V
Zen Mode (Esc Esc to exit)CTRL + K Z

Debug

ActionKey(s)
Toggle breakpointF9
Start/ContinueF5
StopSHIFT + F5
Step into/outF11 / SHIFT + F11
Step overF10
Show hoverCTRL + K CTRL + I

Integrated terminal

ActionKey(s)
Show integrated terminalCTRL + `
Create new terminalCTRL + SHIFT + `
Copy selectionCTRL + C
Paste into active terminalCTRL + V
Scroll up/downCTRL + ↑ / ↓
Scroll page up/downSHIFT + PgUp / PgDn
Scroll to top/bottomCTRL + Home / End

Vs Code Shortcuts Cheat Sheet

For other operating systems’ keyboard shortcuts and additional information, see Key Bindings for Visual Studio Code.

Preference settings

Cheat Sheet Visual Studio Code

Cheat Sheet Visual Studio Code Download

Following is NOT an exhaustive list of all preference settings that are available. There are more, but these are just the ones I have so far found useful.

To access settings, go to File > Preferences > Settings, or press CTRL + ,

SettingDescription
editor.minimap.enabledControls whether the minimap is shown.
editor.renderControlCharactersControls whether the editor should render control characters.
editor.renderWhitespaceControls whether the editor should render whitespace characters.
explorer.compactFoldersControls whether the explorer should render folders in a compact form. In such a form, single child folders will be compressed in a combined tree element. Useful for Java package structures, for example.
html.autoClosingTagsEnable/disable autoclosing of HTML tags.
javascript.updateImportsOnFileMove.enabledEnable/disable automatic updating of import paths when you rename or move a file in VS Code. Requires using TypeScript 2.9 or newer in the workspace.
window.zoomLevelAdjust the zoom level of the window. The original size is 0 and each increment above (e.g. 1) or below (e.g. -1) represents zooming 20% larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity.
workbench.tree.indentControls tree indentation in pixels.
workbench.tree.renderIndentGuidesControls whether the tree should render indent guides.

Plugins

HTML Tag Wrap

Plugin dependency: htmltagwrap

Wraps selected code with HTML tags.

Usage

  • Select one or more blocks of text or strings of text.
  • Press Alt + W or Option + W for Mac.
  • Type the tag name you want.

By default, pressing spacebar will deselect the closing tags, so you can add attributes to the opening tags (you can turn this feature off, see below). If nothing is selected when you run htmltagwrap, it will add an opening and closing tag at the cursor position.

NOTE: This extension works best in files that either use tabs or spaces for indentation. It may not work as well with mixed tabs/spaces.