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+PorF1π¨ -
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)