Best VSCode shortcuts (cheat sheet)

Matan Cohen Abravanel
Level Up Coding
Published in
2 min readDec 22, 2018

--

Master your IDE

The image was taken by “Paweł Furman” https://unsplash.com/@pawelo81

Terminal + VSCode

  • $code index.js -n Open file in a new window
  • $code -g index.js:10:2 open file in line 10, column 2
  • $code index.js -r Open file at the same project that is currently open

VSCode + Navigation

  • Command 1 Focus on the left side editor
  • Command 2 Focus on the right side editor (Will open the right if closed)
  • Command Shift P Then hit : to search for a specific line (Press double P to jump back one screen)
  • Command Shift O Search for method withing file (Or enter @ at search field)
  • Command B Toggle sidebar visibility
  • Command P Find a file
  • Control Tab Go back
  • Control ` Open terminal
  • Command Shift E Jump to Explorer

VCCode + Editing

  • Command shift \ Jump to closing brackets
  • Command F2 Rename
  • Command Shift L Rename only selected text (All matching words in a specific file)
  • Option Then mouse click in multiple areas for multiple cursor editing
  • Option Command Up/Down Add multiple cursors vertically
  • Command D After selecting a word, continue pressing D (While pressing Command) for selecting the next word with matching text. To skip a word from editing and jumping to the next one, hit K (Still while pressing Command) and D again (progressive multi cursor selection)
  • Control Space Autocomplete
  • Option Shift Down/Up Duplicate row up or down
  • Option Down Move line down
  • Command K Wait, release keys, then hit Z Zen mode closes all side/bottoms bars
  • Shift Control Command Right Smart selection. Hit the same with Left for selecting less
  • F12 Jump to definition (Option F12 to ‘peak’ at definition)
  • Shift F12 Find Usages
  • Command Option Click Open definition on the right
  • Ctrl Shift F Reformat/Reindent file

Stay ZEN.

--

--