Keyboard Shortcuts for Visual Studio Code

Are you finding the Keyboard Shortcuts for Visual Studio Code? Visual Studio Code provides shortcuts to help you quickly work on documents. Here is the list of all shortcuts that you can use. This post will help you to check and make your work faster with the most used.

Editing

CutlineCtrl + X
Insert line bellowCtrl + ↩
Insert line aboveCtrl + ⇧ + ↩
Move line/selection upAlt + ↑
Move line/selection downAlt + ↓
Select word – Repeat select others occurrencesCtrl + D
Delete LineCtrl + ⇧ + K
Indent current line(s)Ctrl + ]
Un-indent current line(s)Ctrl + [
Duplicate line(s) up/downAlt + ⇧ + ↑/↓
Go to the begining of lineHome
Go to the end of lineEnd
Scroll line upCtrl + ↑
Scroll line downCtrl + ↓
Go to the begining of fileCtrl + Home
Go to the end of fileCtrl + End
Collapse regionCtrl + ⇧ + [
Uncollapse regionCtrl + ⇧ + ]
Collapse all regionsCtrl + K Ctrl + 0
Uncoollapse all regionsCtrl + K Ctrl + J
Toggle line commentCtrl + /
Toggle word wrapAlt + Z

Navigation/Goto Anywhere

Show all Symbols
Goto line in current fileCtrl + G
Quick-open files by nameCtrl + P
Goto symbolCtrl + ⇧ + O
Show Problems panelCtrl + ⇧ + M
Go to next error warningF8
Go to previous error warning⇧ + F8
Navigate editor group historyCtrl + ⇧ + Tab
Go back / forwardAlt + ← / →

General

Command promptCtrl + ⇧ + P
Toggle side barCtrl + KB
Show scope in status barCtrl + ⇧ + Alt + P

Find/Replace

FindCtrl + F
ReplaceCtrl + H
Find next / previousF3 / ⇧ + F3
Select all occurrences of Find matchAlt + ↩
Find in filesCtrl + ⇧ + F
Add selection to the next Find matchCtrl + D

Multi-cursor and selection

Insert cursorAlt + Click
Undo last cursor operationCtrl + U
Insert cursor at end of each line selected⇧ + Alt + I
Select current lineCtrl + I
Select all occurrences of current selectionCtrl + ⇧ + L
Select all occurrences of current wordCtrl + F2
Expand selection⇧ + Alt + →
Shrink selection⇧ + Alt + ←
Column (box) selection⇧ + Alt + (drag mouse)

Rich languages editing

Trigger suggestionCtrl + Space
Trigger parameter hintsCtrl + ⇧ + Space
Format document⇧ + Alt + F
Format selectionCtrl + K Ctrl + F
Go to definitionF12
Peek definitionAlt + F12
Open Definition to the sideCtrl + K F12
Trim trailing whitespaceCtrl + K Ctrl + X
Change file languageCtrl + K M

Editor management

Close editorCtrl + F4
Close folderCtrl + K F
Split editor in 1 / 2 / 3 partsCtrl + 1 / 2 / 3
Split view into two columnsAlt + ⇧ + 2
Revert view to single columnAlt + ⇧ + 1
Move editor left/rightCtrl + ⇧ + PgUp / PgDn
Toggle editor layout (horizontal/vertical)⇧ + Alt + 0

File management

New fileCtrl + N
Open file…Ctrl + O
Close current tabCtrl + W
SaveCtrl + S
Save as…Ctrl + ⇧ + S
Save allCtrl + K S
Reopen closed editorCtrl + ⇧ + T
Toggle tabsCtrl + Tab
Switch to tab number [NUM] where [NUM] <= number of tabsAlt + [NUM]
Reveal active file in ExplorerCtrl + K R
Show active file in new window/instanceCtrl + K O

Display

Toggle full screenF11
Zoom in/outCtrl + =/-
Toggle Sidebar visibilityCtrl + B
Show Explorer / Toggle focusCtrl + ⇧ + E
Show SearchCtrl + ⇧ + F
Show Source ControlCtrl + ⇧ + G
Show DebugCtrl + ⇧ + D
Show ExtensionsCtrl + ⇧ + E
Replace in filesCtrl + ⇧ + H
Toggle Search detailsCtrl + ⇧ + J
Toggle Output panelCtrl + ⇧ + U
Open Markdown previewCtrl + ⇧ + V
Open Markdown preview to the sideCtrl + K V
Zen Mode (Esc Esc to exit)Ctrl + K Z

Debug

Toggle breakpointF9
Start/ContinueF5
Stop⇧ + F5
Step into/outF11 / ⇧ + F11
Step overF10
Show hoverCtrl + K Ctrl + I

Integrated terminal

Show integrated terminalCtrl + `
Create new terminalCtrl + ⇧ + `
Copy selectionCtrl + C
Paste into active terminalCtrl + V
Scroll up/downCtrl + ↑ / ↓
Scroll page up/down⇧ + PgUp / PgDn
Scroll to top/bottomCtrl + Home / End

Related Shortcuts:

  Keyboard Shortcuts for Xcode

Well, there you have it, Visual Studio Code shortcuts list. You might not have known about these shortcuts. If I’ve left important something out in this list, feedback is appreciated and welcome on the Make A Public List.

Feel free to comment below.

Was this article helpful?
YesNo

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.