DEV Community

Cover image for Boost Your Productivity with These 50 Essential VS Code Shortcuts πŸš€
Sachin Gadekar
Sachin Gadekar

Posted on

Boost Your Productivity with These 50 Essential VS Code Shortcuts πŸš€

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

  1. Open Command Palette: Ctrl+Shift+P or F1 🎨
  2. Quick Open: Ctrl+P πŸ”
  3. New Window: Ctrl+Shift+N πŸ†•
  4. Close Window: Ctrl+Shift+W ❌

Basic Editing

  1. Cut Line: Ctrl+X βœ‚οΈ
  2. Copy Line: Ctrl+C πŸ“‹
  3. Move Line Up/Down: Alt+Up/Down πŸ”ΌπŸ”½
  4. Duplicate Line: Shift+Alt+Up/Down πŸ“‘
  5. Delete Line: Ctrl+Shift+K πŸ—‘οΈ
  6. Undo: Ctrl+Z ↩️
  7. Redo: Ctrl+Y β†ͺ️

Navigation

  1. Go to File: Ctrl+P πŸ“
  2. Go to Line: Ctrl+G πŸ“
  3. Go to Symbol: Ctrl+Shift+O πŸ”£
  4. Show Problems Panel: Ctrl+Shift+M ❗
  5. Toggle Terminal: Ctrl+` ⌨️

Search and Replace

  1. Find: Ctrl+F πŸ”Ž
  2. Replace: Ctrl+H πŸ”„
  3. Find in Files: Ctrl+Shift+F πŸ“‚
  4. Replace in Files: Ctrl+Shift+H πŸ—ƒοΈ

Multi-Cursor and Selection

  1. Add Cursor Above/Below: Ctrl+Alt+Up/Down ⬆️⬇️
  2. Select All Occurrences of Current Selection: Ctrl+Shift+L πŸ”„
  3. Select All Occurrences of Current Word: Ctrl+F2 πŸ’¬

File Management

  1. New File: Ctrl+N πŸ†•
  2. Open File: Ctrl+O πŸ“‚
  3. Save: Ctrl+S πŸ’Ύ
  4. Save As: Ctrl+Shift+S πŸ–«
  5. Save All: Ctrl+K S πŸ–§
  6. Close: Ctrl+W ❌
  7. Close All: Ctrl+K W πŸšͺ

Code Editing

  1. Format Document: Shift+Alt+F πŸ–ŠοΈ
  2. Format Selection: Ctrl+K Ctrl+F ✏️
  3. Comment Line: Ctrl+/ πŸ’¬
  4. Block Comment: Shift+Alt+A πŸ—―οΈ

Version Control

  1. Open Git: Ctrl+Shift+G πŸ—ƒοΈ
  2. Stage Changes: Ctrl+Shift+S πŸ“
  3. Commit: Ctrl+Enter βœ…

Debugging

  1. Start Debugging: F5 🐞
  2. Stop Debugging: Shift+F5 πŸ›‘
  3. Step Over: F10 πŸ”„
  4. Step Into: F11 ⬇️
  5. Step Out: Shift+F11 ⬆️
  6. Toggle Breakpoint: F9 β›”
  7. Show Debug Console: Ctrl+Shift+Y πŸ–₯️

Integrated Terminal

  1. Create New Terminal: Ctrl+` βž•
  2. Kill Terminal: Ctrl+Shift+` ❌
  3. Toggle Terminal: Ctrl+` ↔️

Extension Management

  1. Show Extensions: Ctrl+Shift+X πŸ”§
  2. Install Extension: Ctrl+P, then type ext install πŸ“¦
  3. Uninstall Extension: Ctrl+P, then type ext 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! πŸš€

Series Index

Part Title Link
1 πŸ› οΈ Popular Automation Testing Tools Read
2 πŸš€Power of Automation Testing!πŸš€ Read

Top comments (0)