VS Code shortcuts to boost your productivity

02 Jan 2020
vscode

Did you ever wanted to write code like a pro? To move chunks of code back and forth easily? Access whatever you want in the blink of an eye? Well, I did.

All the coding courses I took were recorded by instructors who seemed to know their code editor by heart. Seeing them slamming their keyboard and manipulating their code like pros made me think it was just ridiculous. That’s when I decided to learn all the essential shortcuts of my favorite code editor: VS Code. So, if you’re looking to be more productive as a developer, don’t wait any further and play the video!

You’ll find below the different shortcuts used in the video:

  • Open the command palette: ⇧ + ⌘ + P or Ctrl + Shift + P
  • Open keyboard shortcuts: ⌘ + K ⌘ + S or Ctrl + K Ctrl + S
  • Open user settings: ⌘ + , or Ctrl + ,

Editing

  • Undo: ⌘ + Z or Ctrl + Z
  • Redo: ⇧ + ⌘ + Z or Ctrl + Shift + Z
  • Remove one word: ⌥ + ⌫ or Ctrl + Backspace
  • Cut line: ⌘ + X or Ctrl + X
  • Copy line: ⌘ + C or Ctrl + C
  • Paste line: ⌘ + V or Ctrl + V
  • Delete line: ⇧ + ⌘ + K or Ctrl + Shift + K
  • Move line up/down: ⌥ + ↑/↓ or Alt + ↑/↓
  • Copy line up/down: ⇧ + ⌥ + ↑/↓ or Shift + Alt + ↑/↓
  • Toggle line commment: ⌘ + / or Ctrl + /

Selecting

  • Select the next/previous letter: ⇧ + →/← or Shift + →/←
  • Select the next/previous word: ⇧ + ⌥ + →/← or Ctrl + Shift + →/←
  • : Select current line / current and next line / etc : ⌘ + L / ⌘ + L ⌘ + L or Ctrl + L / Ctrl + L Ctrl + L
  • Select line up/down: ⇧ + ↑/↓ or Ctrl + Shift + ↑/↓
  • Select to the beginning/end of file: ⇧ + ⌘ + ↑/↓ or Ctrl + Shift + Home/End
  • Expand/Shrink selection: ⇧ + ⌃ + →/← or Shift + Alt + →/←

Navigating

  • Go to the next/previous word: ⌥ + → or Ctrl + →/←
  • Go to beginning/end of line: ⌘ + →/← or Home/End
  • Go to beginning/end of file: ⌘ + ↑/↓ or Ctrl + Home/End
  • Go to line: ⌃ + G or Ctrl + G
  • Go to file / Go to previous file: ⌘ + P / ⌘ + P ⌘ + P or Ctrl + P / Ctrl + P Ctrl + P
  • Open next opened tab: ⌃ + Tab or Ctrl + Tab
  • Go to symbol: ⇧ + ⌘ + O or Ctrl + Shift + O
  • Go to symbol in the workspace: ⌘ + T or Ctrl + T

Files

  • Save file: ⌘ + S or Ctrl + S
  • Close file: ⌘ + W or Ctrl + W
  • Close all files: ⌘ + K ⌘ + W or Ctrl + K Ctrl + W
  • Open previously closed: ⇧ + ⌘ + T or Ctrl + Shift + T

Search

  • Find: ⌘ + F or Ctrl + F
  • Replace: ⌘ + ⌥ + F or Ctrl + H
  • Find next/previous: ⌘ + G / ⇧ + ⌘ + G or Ctrl + F3 / Shift + Ctrl +F3

Cursors

  • Insert cursor: ⌥ + Click or Alt + Click
  • Insert cursor above: ⌥ + ⌘ + ↑/↓ or Ctrl + Alt + ↑
  • Select next match: ⌘ + D or Ctrl + D
  • De-select previous match: ⌘ + U or Ctrl + U
  • Select all occurrences of current word: ⇧ + ⌘ + L or Ctrl + Shift + L
  • Remove cursors: Escape

Display

  • Show Explorer: ⇧ + ⌘ + E or Ctrl + Shift + E
  • Show Search: ⇧ + ⌘ + F or Ctrl + Shift + F
  • Show Source Control: ⇧ + ⌃ + G or Ctrl + Shift + G
  • Show Debug: ⇧ + ⌘ + D or Ctrl + Shift + D: Show Debug
  • Show Extensions: ⇧ + ⌘ + X or Ctrl + Shift + X
  • Toggle Sidebar: ⌘ + B or Ctrl + B
  • Split editor: ⌘ + \ or Ctrl + \
  • Enter zen mode: ⌘ + K Z or Ctrl + K Z
  • Show (focus) integrated terminal: ⌃ + ` or Ctrl + `
  • Focus first/second/third editor window: ⌘ + 1 / ⌘ + 2 / ⌘ + 3 or Ctrl + 1 / Ctrl + 2 / Ctrl + 3

Alternatively, you can also check the official keyboard shortcuts of VS Code for macOS and for Windows.

👀This post may also interest you

Writing blazing fast HTML code


Join the newsletter and read an exclusive post!

You'll get updates when I release new content, tips and tricks to improve your workflow and more! Ready to take your front-end skills to the next level? 🚀

No spams. Unsubscribe at any time.

Powered by Buttondown.

© 2020 Thomas Lombart