Most Useful VS Code Keybinds

Here are the shortcuts I find myself using on a daily basis. I will update this post as I think of more.

Last updated: 16th January 2023.

  • CMD + SHIFT + K: Remove the current line (better than CMD + X because it does not overwrite clipboard).
  • CMD + K then CMD + U: Close all file editors for file which are opened and have been saved.
  • CMD + B: Toggle sidebar for when it gets in the way.
  • CMD + D: Highlight the next occurrence of the currently selected text. Use again/repeatedly to highlight more occurrences.
  • CMD + N: Create a new file.
  • CMD + W: Close the current file.
  • CMD + SHIFT + N: New window
  • CMD + Enter: Acts as ‘submit’ on text field inputs on the VS Code UI.
  • CMD + G: Enter a line number and hit ‘Enter’ after using this keybind and you will jump to that line number in the file.

Find & Replace

  • CMD + OPTION + F: Find in current file.
  • CMD + SHIFT + F: Find in workspace.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *