Visual Studio Code: 30 Keyboard Shortcuts to Know

March 14, 2024Share
blog picture -Visual Studio Code: 30 Keyboard Shortcuts to Know

It's no longer up for debate.

VS Code (Visual Studio Code) is among developers' favorite text editors. It's actually the most popular and free code editor out there.

In this article, I'll introduce you to 30 keyboard shortcuts you should know on VS Code.

Basic Shortcuts on VS Code

  • Ctrl + X: Cut a line
  • Ctrl + C: Copy a line
  • Alt + Up or Down: Move a line up or down
  • Shift + Alt + Up or Down: Copy a line up or down
  • Ctrl + Shift + K: Delete a line
  • Enter: Insert a line below
  • Ctrl + Shift + Enter: Insert a line above
  • Ctrl + F: Find
  • Ctrl + H: Replace
  • Ctrl + /: Comment or uncomment a line
  • Shift + Alt + A: Insert a block comment
  • Alt + Z: Toggle word wrap
  • Tab: Indentation
  • Shift + Tab: Outdent

VS Code Shortcuts for Navigation

  • Ctrl + Shift + ‘: Open a new terminal
  • Ctrl + Shift + M: Open the Problems panel
  • Ctrl + P: Go to file

VS Code Shortcuts for File Management

  • Ctrl + N: New file
  • Ctrl + O: Open file
  • Ctrl + S: Save
  • Ctrl + Shift + S: Save as...
  • Ctrl + Shift + T: Reopen closed file
  • Ctrl + Tab: Open next file
  • Ctrl + Shift + Tab: Open previous file

VS Code Shortcuts for Display

  • Ctrl + =: Zoom in
  • Ctrl + -: Zoom out
  • Ctrl + B: Toggle sidebar
  • Ctrl + Shift + F: Show search bar
  • Ctrl + Shift + X: Show extensions
  • Ctrl + Shift + D: Show Debug tab

That's all for this article.

If you know any other VS Code shortcuts that I haven't mentioned here, feel free to let me know in the comments.

Tags: Top, Tips, Productivity