✔ General
- Global Find
CTRL
+SHIFT
+F
- Show Command Palette
Ctrl
+Shift
+P
ORF1
- Quick Open, Go to File…
Ctrl
+P
- New window/instance
Ctrl
+Shift
+N
- Close window/instance
Ctrl
+Shift
+W
- User Settings
Ctrl
+,
- Keyboard Shortcuts
Ctrl
+K
ORCtrl
+S
✔ Basic Editing
Ctrl+X
Cut line (empty selection)Ctrl+C
Copy line (empty selection)Alt+ ↑ / ↓
Move line up/downShift+Alt + ↓ / ↑
Copy line up/downCtrl+Shift+K
Delete lineCtrl+Enter
Insert line belowCtrl+Shift+Enter
Insert line aboveCtrl+Shift+\
Jump to matching bracketCtrl+] / [
Indent/outdent lineHome / End
Go to beginning/end of lineCtrl+Home
Go to beginning of fileCtrl+End
Go to end of fileCtrl+↑ / ↓
Scroll line up/downAlt+PgUp / PgDn
Scroll page up/downCtrl+Shift+[
Fold (collapse) regionCtrl+Shift+]
Unfold (uncollapse) regionCtrl+K Ctrl+[
Fold (collapse) all subregionsCtrl+K Ctrl+]
Unfold (uncollapse) all subregionsCtrl+K Ctrl+0
Fold (collapse) all regionsCtrl+K Ctrl+J
Unfold (uncollapse) all regionsCtrl+K Ctrl+C
Add line commentCtrl+K Ctrl+U
Remove line commentCtrl+/
Toggle line commentShift+Alt+A
Toggle block commentAlt+Z
Toggle word wrap
✔ Navigation Shortcuts
Ctrl+T
Show all SymbolsCtrl+G
Go to Line...Ctrl+P
Go to File...Ctrl+Shift+O
Go to Symbol...Ctrl+Shift+M
Show Problems panelF8
Go to next error or warningShift+F8
Go to previous error or warningCtrl+Shift+Tab
Navigate editor group historyAlt+ ← / →
Go back / forwardCtrl+M
Toggle Tab moves focus
✔ Search and replace
Ctrl+F
FindCtrl+H
ReplaceF3 / Shift+F3
Find next/previousAlt+Enter
Select all occurences of Find matchCtrl+D
Add selection to next Find matchCtrl+K
Ctrl+D
Move last selection to next Find matchAlt
+C
ORR
ORW
Toggle case-sensitive OR regex OR whole word
✔ Multi-cursor & Selection
Alt
+Click
Insert cursorCtrl
+Alt
+↑
/↓
Insert cursor above / belowCtrl
+U
Undo last cursor operationShift
+Alt
+I
Insert cursor at end of each line selectedCtrl
+L
Select current lineCtrl
+Shift
+L
Select all occurrences of current selectionCtrl
+F2
Select all occurrences of current wordShift
+Alt
+→
Expand selectionShift
+Alt
+←
Shrink selectionShift
+Alt
+(drag mouse)
Column (box) selectionCtrl
+Shift
+Alt
+(arrow key)
Column (box) selectionCtrl
+Shift
+Alt
+PgUp/PgDn
Column (box) selection page up/down
✔ Rich languages editing
Ctrl
+Space
,Ctrl
+I
Trigger suggestionCtrl
+Shift
+Space
Trigger parameter hintsShift+Alt+F
Format documentCtrl+K
Ctrl+F
Format selectionF12
Go to DefinitionAlt+F12
Peek DefinitionCtrl+K
F12
Open Definition to the sideCtrl+.
Quick FixShift
+F12
Show ReferencesF2
Rename SymbolCtrl+K
Ctrl+X
Trim trailing whitespaceCtrl+K
M
Change file language
✔ Editor management
Ctrl
+F4
,Ctrl+W
Close editorCtrl
+K
F
Close folderCtrl
+\
Split editorCtrl
+1
/2
/3
Focus into 1st, 2nd or 3rd editor groupCtrl
+K
Ctrl
+←
/→
Focus into previous/next editor groupCtrl
+Shift
+PgUp
/PgDn
Move editor left/rightCtrl
+K
←
/→
Move active editor group
✔ File management
Ctrl
+N
New FileCtrl
+O
Open File...Ctrl
+S
SaveCtrl
+Shift
+S
Save As...Ctrl
+K
S
Save AllCtrl
+F4
CloseCtrl
+K
Ctrl
+W``` Close AllCtrl
+Shift
+T
Reopen closed editorCtrl
+K
Enter Keep preview mode editor openCtrl
+Tab
Open nextCtrl
+Shift
+Tab
Open previousCtrl
+K
P
Copy path of active fileCtrl
+K
R
Reveal active file in ExplorerCtrl
+K
O
Show active file in new window/instance
✔ Display
F11
Toggle full screenShift+Alt+0
Toggle editor layout (horizontal/vertical)Ctrl+ = / -
Zoom in/outCtrl+B
Toggle Sidebar visibilityCtrl+Shift+E
Show Explorer / Toggle focusCtrl+Shift+F
Show SearchCtrl+Shift+G
Show Source ControlCtrl+Shift+D
Show DebugCtrl+Shift+X
Show ExtensionsCtrl+Shift+H
Replace in filesCtrl+Shift+J
Toggle Search detailsCtrl+Shift+U
Show Output panelCtrl+Shift+V
Open Markdown previewCtrl+K
V
Open Markdown preview to the sideCtrl+K
Z
Zen Mode (Esc Esc to exit)
✔ Debug
F9
Toggle breakpointF5
Start/ContinueShift
+F5
StopF11
/Shift
+F11
Step into/outF10
Step overCtrl+K
Ctrl+I
Show Hover
✔ Integrated Terminal
Ctrl
+`
Show integrated terminalCtrl
+Shift
+`
Create new terminalCtrl
+C
Copy selectionCtrl
+V
Paste into active terminalCtrl
+↑
/↓
Scroll up/downShift
+PgUp
/PgDn
Scroll page up/downCtrl
+Home
/End
Scroll to top/bottom-
- Ctrl + Shift + A => Toggle Block Comment
- Ctrl + L => Select Current Line
- Ctrl + Space => Trigger Suggestion
- Alt + Up arrow / Alt + Down Arrow => Move line up /down
- Ctrl + . => Quick fix
- F3 / Shift F3 = > Find Next / Previous
- Ctrl + ` => Show / Hide Integrated Terminal
- Ctrl + Shift +M => Show Problems panel
- Ctrl + B => Toggle Sidebar visibility
- Ctrl + W => Close File / Close Editor
- Ctrl + G => Go to Line/Column
- Ctrl + / => Add line comment
- Ctrl + Shift + S => Save as
- Ctrl + X => Undo
- Ctrl + Y => Redo
- Ctrl + Scroll Up => Zoom in
- Ctrl + Scroll Down => Zoom out
- Ctrl + Enter => Place Cursor to new line
- VSCode is one of the most popular editors for web development. When writing code, we often require certain formatting actions, and a lot of them are supported by VSCode itself.
(Windows/Linux: CTRL + P)
- Navigating through files is one of the most common options and this command can come in pretty handy. You can type the name of the file in the search box and select the file by clicking or by pressing enter on the search result to open the file
(Windows/Linux: CTRL + SHIFT + L)
-
One of my favorite features of VSCode is multi cursors. They allow you to replace text or append more text without copy-pasting or requiring you to change it one at a time.
-
Using this command, you can add cursors to all matching selections in the document
(Windows/Linux: CTRL + D)
- Like the above command, this is also used to add cursors but with this, you can add the cursor to the next matching selection. This is especially helpful when you don't want to select all occurrences together
(Windows/Linux: CTRL + U)
- If you need to undo cursor selection in a case where you selected more cursors than required or reset the cursor to a previous position, you can use this command to undo the last cursor action
(Windows/Linux: CTRL + L)
- Often we use mouse drag to select the text, but if we want to select entire lines, we can use this command
Windows: Ctrl+Space, Ctrl+Shift+Space Mac: CMD+Space, CMD+Shift+Space
Trigger suggestions and parameter hints are useful when you are working on Visual Studio Code.
However, this can be often frustrating as the suggestion box covers the previous code line. A simple way is to quickly show or remove trigger suggestions and trigger parameter hints through keyboard shortcuts.