DEV Community

Cover image for VSCode productive shortcut keys
Le Vuong
Le Vuong

Posted on • Edited on

3

VSCode productive shortcut keys

ChatGPT - Here are 50 of the most commonly used shortcut keys in Visual Studio Code:

  1. Ctrl + P (Cmd + P on macOS): Quick Open - Open file by name.

  2. Ctrl + Shift + P (Cmd + Shift + P on macOS): Show Command Palette - Access all commands and features.

  3. Ctrl + `(Cmd + ` on macOS): Toggle Terminal - Open or close the integrated terminal.

  4. Ctrl + B (Cmd + B on macOS): Toggle Sidebar - Show or hide the sidebar.

  5. Ctrl + Shift + E (Cmd + Shift + E on macOS): Focus on Explorer - Focus on the file explorer sidebar.

  6. Ctrl + Shift + F (Cmd + Shift + F on macOS): Search in Files - Search for a string or regular expression in all files.

  7. Ctrl + Shift + G (Cmd + Shift + G on macOS): Focus on Source Control - Focus on the source control sidebar.

  8. Ctrl + Shift + D (Cmd + Shift + D on macOS): Focus on Debug - Focus on the debugging sidebar.

  9. Ctrl + K, S (Cmd + K, S on macOS): Save All - Save all open files.

  10. Ctrl + W (Cmd + W on macOS): Close Editor - Close the active editor tab.

  11. Ctrl + Tab (Cmd + Tab on macOS): Switch between Editor Tabs - Cycle through open editor tabs.

  12. Ctrl + Shift + Tab (Cmd + Shift + Tab on macOS): Move Backward through Editor Tabs.

  13. Ctrl + \ (Cmd + \ on macOS): Split Editor - Split the active editor into two panes.

  14. Ctrl + K, Ctrl + \ (Cmd + K, Cmd + \ on macOS): Split Editor Down - Split the active editor into two panes vertically.

  15. Ctrl + K, Ctrl + Shift + \ (Cmd + K, Cmd + Shift + \ on macOS): Split Editor Right - Split the active editor into two panes horizontally.

  16. Ctrl + Shift + O (Cmd + Shift + O on macOS): Go to Symbol - Navigate to a symbol in the current file.

  17. Ctrl + G (Cmd + G on macOS): Go to Line - Jump to a specific line in the current file.

  18. Ctrl + F (Cmd + F on macOS): Find - Search for a string in the current file.

  19. Ctrl + H (Cmd + H on macOS): Replace - Find and replace a string in the current file.

  20. Ctrl + Shift + F (Cmd + Option + F on macOS): Find in Files - Search for a string in all files within a directory.

  21. Ctrl + / (Cmd + / on macOS): Toggle Line Comment - Comment or uncomment a line or block of code.

  22. Ctrl + Enter (Cmd + Enter on macOS): Insert Line Below - Insert a new line below the current line.

  23. Ctrl + Shift + Enter (Cmd + Shift + Enter on macOS): Insert Line Above - Insert a new line above the current line.

  24. Ctrl + Shift + K (Cmd + Shift + K on macOS): Delete Line - Delete the current line.

  25. Alt + ↑ / ↓ (Option + ↑ / ↓ on macOS): Move Line Up / Down - Move the current line up or down.

  26. Alt + Shift + ↓ (Option + Shift + ↓ on macOS): Copy Line Down - Duplicate the current line below.

  27. Ctrl + D (Cmd + D on macOS): Add Selection to Next Find Match - Select the next occurrence of the current word.

  28. Ctrl + Shift + L (Cmd + Shift + L on macOS): Select All Occurrences of Find Match - Select all occurrences of the current word in the file.

  29. Alt + Shift + F (Option + Shift + F on macOS): Format Document - Format the current document according to the configured formatting rules.

  30. Ctrl + Space (Cmd + Space on macOS): Trigger Suggest - Trigger IntelliSense suggestions for code completion.

  31. Ctrl + Shift + Space (Cmd + Shift + Space on macOS): Trigger Parameter Hints - Display parameter hints for the current method or function call.

  32. Ctrl + . (Cmd + . on macOS): Quick Fix - Display quick fixes and suggestions for code issues.

  33. Alt + Shift + ↑ / ↓ (Option + Shift + ↑ / ↓ on macOS): Copy Line Up / Down - Copy the current line and paste it above or below.

  34. Shift + Alt + ↑ / ↓ (Shift + Option + ↑ / ↓ on macOS): Insert Cursor Above / Below - Insert an additional cursor above or below the current cursor position.

  35. Ctrl + Shift + Alt + ↑ / ↓ (Cmd + Option + Shift + ↑ / ↓ on macOS): Insert Cursor Above / Below with Box Selection - Insert an additional cursor above or below with box selection.

  36. Ctrl + Shift + M (Cmd + Shift + M on macOS): Toggle Error / Warning Messages - Show or hide the problems panel.

  37. Ctrl + J (Cmd + J on macOS): Toggle Panel - Show or hide the panel at the bottom of the window.

  38. Ctrl + Shift + U (Cmd + Shift + U on macOS): Toggle Output Panel - Show or hide the output panel.

  39. Ctrl + K, Ctrl + X (Cmd + K, Cmd + X on macOS): Trim Trailing Whitespace - Remove trailing whitespace from the current file.

  40. Ctrl + K, M (Cmd + K, M on macOS): Change Language Mode - Change the language mode for the current file.

  41. Ctrl + K, Ctrl + I (Cmd + K, Cmd + I on macOS): Show Hover - Display hover information for the current symbol.

  42. Ctrl + K, V (Cmd + K, V on macOS): Markdown Preview - Open a preview of the current Markdown file.

  43. Ctrl + Shift + V (Cmd + Shift + V on macOS): Markdown Preview to Side - Open a preview of the current Markdown file in a side-by-side view.

  44. Ctrl + K, R (Cmd + K, R on macOS): Reveal Active File in Explorer - Navigate to the active file in the file explorer sidebar.

  45. Ctrl + K, O (Cmd + K, O on macOS): Show Opened File - Display a list of all opened files.

  46. Ctrl + K, P (Cmd + K, P on macOS): Copy Path of Active File - Copy the path of the active file to the clipboard.

  47. Ctrl + K, Ctrl + C (Cmd + K, Cmd + C on macOS): Add Line Comment - Comment out the current line or selected block of code.

  48. Ctrl + K, Ctrl + U (Cmd + K, Cmd + U on macOS): Remove Line Comment - Uncomment the current line or selected block of code.

  49. Ctrl + Shift + K (Cmd + Shift + K on macOS): Delete Line - Delete the current line.

  50. Ctrl + Shift + [ (Cmd + Shift + [ on macOS): Fold (Collapse) Region - Fold the current code region.

These shortcuts can significantly improve your efficiency when working in Visual Studio Code by reducing the need to use the mouse and allowing you to perform common tasks more quickly.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay