DEV Community

Cover image for VS Code Cheat Sheet 2022
Santosh Devnath
Santosh Devnath

Posted on

VS Code Cheat Sheet 2022

Hi guys, we all love VS code and using VS Code shortcuts, you can save your lots of time. So here I have mentioned important VS Code Cheat Sheet for 2022.

Editing 1

  1. shift+ctrl+↵ - Insert line above
  2. ctrl+↵ - Insert line below
  3. shift+ctrl+K - Delete line
  4. shift+alt+UP - Copy line up
  5. shift+alt+DOWN - Copy line down
  6. alt+UP - Move line up
  7. alt+DOWN - Move line down

Editing 2

  1. shift+ctrl+] - Unfold region
  2. shift+ctrl+[ - Fold region
  3. ctrl+[ - Outdent line
  4. ctrl+] - Indent line
  5. shift+ctrl+\ - Jump to matching bracket

Editing 3

  1. alt+Z - Toggle word wrap
  2. shift+alt+A - Toggle block comment
  3. ctrl+/ - Toggle line comment
  4. ctrl+Kctrl+J - Unfold all regions
  5. ctrl+Kctrl+0 - Fold all regions
  6. ctrl+Kctrl+] - Unfold all subregions
  7. ctrl+Kctrl+[ - Fold all subregions

Multi-cursor / Selection 1

  1. shift+ctrl+L - Select all occurrences of current selection
  2. ctrl+I - Select current line
  3. shift+alt+I - Insert cursor at end of each line selected
  4. ctrl+U - Undo last cursor operation
  5. alt+ctrl+DOWN - Insert cursor below
  6. alt+ctrl+UP - Insert cursor above

Multi-cursor / Selection 2

  1. shift+alt+ctrl+LEFT - Column box selection left
  2. shift+alt+ctrl+RIGHT - Column box selection right
  3. shift+alt+ctrl+DOWN - Column box selection down
  4. shift+alt+ctrl+UP - Column box selection up
  5. shift+alt+LEFT - Shrink selection
  6. shift+alt+RIGHT - Expand selection

Search / Replace 1

  1. ctrl+Kctrl+D - Move last selection to next Find match
  2. alt+↵ - Select all occurrences of Find match
  3. ctrl+D - Add selection to next Find match
  4. shift+F3 - Find previous
  5. F3 - Find next
  6. ctrl+H - Replace
  7. ctrl+F - Find

Rich Languages Editing 1

  1. alt+F12 - Peek definition
  2. F12 - Go to definition
  3. ctrl+Kctrl+F - Format selection
  4. shift+alt+F - Format document
  5. shift+ctrl+[SPACE] - Trigger parameter hints
  6. ctrl+[SPACE] - Trigger suggestion

Rich Languages Editing 2

  1. ctrl+KM - Change file language
  2. ctrl+Kctrl+X - Trim trailing whitespace
  3. F2 - Rename symbol
  4. shift+F12 - Show references
  5. ctrl+. - Quick fix
  6. ctrl+KF12 - Open definition to the side

Navigation

  1. ctrl+M - Toggle tab moves focus
  2. alt+RIGHT - Go forward
  3. alt+LEFT - Go back
  4. shift+F8 - Go to previous error or warning
  5. F8 - Go to next error or warning
  6. shift+ctrl+M - Show problems panel
  7. shift+ctrl+O - Go to symbol...
  8. ctrl+P - Go to file...
  9. ctrl+G - Go to line...

Editor Management

  1. ctrl+3 - Focus into 3rd editor window
  2. ctrl+2 - Focus into 2nd editor window
  3. ctrl+1 - Focus info 1st editor window
  4. ctrl+\ - Split editor
  5. ctrl+KF - Close folder

Comment down your Favorite shortcut you use daily

Discussion (0)