Visual Studio Code (VS Code) is a powerful and versatile code editor, and mastering its shortcuts can greatly enhance your coding efficiency. Here are 50 essential VS Code shortcuts that every developer should know.
General Shortcuts
-
Open Command Palette:
Ctrl+Shift+P
orF1
π¨ -
Quick Open:
Ctrl+P
π -
New Window:
Ctrl+Shift+N
π -
Close Window:
Ctrl+Shift+W
β
Basic Editing
-
Cut Line:
Ctrl+X
βοΈ -
Copy Line:
Ctrl+C
π -
Move Line Up/Down:
Alt+Up/Down
πΌπ½ -
Duplicate Line:
Shift+Alt+Up/Down
π -
Delete Line:
Ctrl+Shift+K
ποΈ -
Undo:
Ctrl+Z
β©οΈ -
Redo:
Ctrl+Y
βͺοΈ
Navigation
-
Go to File:
Ctrl+P
π -
Go to Line:
Ctrl+G
π -
Go to Symbol:
Ctrl+Shift+O
π£ -
Show Problems Panel:
Ctrl+Shift+M
β -
Toggle Terminal:
Ctrl+`
β¨οΈ
Search and Replace
-
Find:
Ctrl+F
π -
Replace:
Ctrl+H
π -
Find in Files:
Ctrl+Shift+F
π -
Replace in Files:
Ctrl+Shift+H
ποΈ
Multi-Cursor and Selection
-
Add Cursor Above/Below:
Ctrl+Alt+Up/Down
β¬οΈβ¬οΈ -
Select All Occurrences of Current Selection:
Ctrl+Shift+L
π -
Select All Occurrences of Current Word:
Ctrl+F2
π¬
File Management
-
New File:
Ctrl+N
π -
Open File:
Ctrl+O
π -
Save:
Ctrl+S
πΎ -
Save As:
Ctrl+Shift+S
π« -
Save All:
Ctrl+K S
π§ -
Close:
Ctrl+W
β -
Close All:
Ctrl+K W
πͺ
Code Editing
-
Format Document:
Shift+Alt+F
ποΈ -
Format Selection:
Ctrl+K Ctrl+F
βοΈ -
Comment Line:
Ctrl+/
π¬ -
Block Comment:
Shift+Alt+A
π―οΈ
Version Control
-
Open Git:
Ctrl+Shift+G
ποΈ -
Stage Changes:
Ctrl+Shift+S
π -
Commit:
Ctrl+Enter
β
Debugging
-
Start Debugging:
F5
π -
Stop Debugging:
Shift+F5
π -
Step Over:
F10
π -
Step Into:
F11
β¬οΈ -
Step Out:
Shift+F11
β¬οΈ -
Toggle Breakpoint:
F9
β -
Show Debug Console:
Ctrl+Shift+Y
π₯οΈ
Integrated Terminal
-
Create New Terminal:
Ctrl+`
β -
Kill Terminal:
Ctrl+Shift+`
β -
Toggle Terminal:
Ctrl+`
βοΈ
Extension Management
-
Show Extensions:
Ctrl+Shift+X
π§ -
Install Extension:
Ctrl+P
, then typeext install
π¦ -
Uninstall Extension:
Ctrl+P
, then typeext uninstall
ποΈ
Conclusion
Knowing these shortcuts can make your coding experience in VS Code much smoother and more efficient. Start integrating them into your daily workflow and watch your productivity soar! π
Top comments (0)