Most Commonly Used Visual Studio Code (VS Code) Shortcuts

CodeWithHonor
2 min readDec 23, 2022

--

Here is a list of some of the most commonly used Visual Studio Code (VS Code) shortcuts:

  1. Ctrl + Shift + P: Open the command palette.
  2. Ctrl + P: Quickly open files by typing their names.
  3. Ctrl + Shift + N: Open a new window.
  4. Ctrl + W: Close the current window.
  5. Ctrl + S: Save the current file.
  6. Ctrl + Z: Undo the last action.
  7. Ctrl + Y: Redo the last action.
  8. Ctrl + X: Cut the selected text.
  9. Ctrl + C: Copy the selected text.
  10. Ctrl + V: Paste the copied text.
  11. Ctrl + Shift + V: Paste the copied text and retain its formatting.
  12. Ctrl + F: Find text within the current file.
  13. Ctrl + H: Replace text within the current file.
  14. Ctrl + G: Go to a specific line number.
  15. Ctrl + Shift + F: Find text within the entire workspace.
  16. Ctrl + Tab: Switch between open files.
  17. Ctrl + Shift + Tab: Reverse the direction of the tab switch.
  18. Ctrl + K + S: Open the keyboard shortcut reference.
  19. Ctrl + Shift + O: Go to a specific symbol in the current file.
  20. Ctrl + Shift + M: Open the problems panel.
  21. Ctrl + Shift + E: Open the explorer panel.
  22. Ctrl + Shift + D: Open the debug panel.
  23. Ctrl + Shift + X: Open the extensions panel.
  24. Ctrl + Shift + U: Open the output panel.
  25. Ctrl + B: Toggle the visibility of the side bar.
  26. Ctrl + K + C: Comment out the selected code.
  27. Ctrl + K + U: Uncomment the selected code.
  28. Ctrl + /: Toggle line comments.
  29. Ctrl + K + F: Format the current file.
  30. F12: Go to the definition of a symbol.
  31. Ctrl + .: Quickly fix errors using the lightbulb menu.
  32. Ctrl + Shift + Up/Down: Move the current line up or down.
  33. Ctrl + Shift + [/]: Collapse or expand the current code block.
  34. Ctrl + K + O: Go to the next or previous symbol.
  35. Ctrl + K + I: Go to the implementation of a symbol.
  36. Shift + Alt + F: Format the selected code.

I hope these shortcuts are helpful for you. Remember that you can always access the complete list of available shortcuts by pressing Ctrl + K + S. You can also customize the shortcuts to suit your needs by going to "File > Preferences > Keyboard Shortcuts" in the menu.

I hope this helps! Let me know if you have any questions.

--

--