VSCode cheat sheet for Mac and Windows

71 shortcuts in 10 lessons for Mac

64 shortcuts in 10 lessons for Windows

Reading a list won't make them stick. ShortcutFoo has you type each shortcut, then brings it back just before you'd forget it.

VSCode shortcuts for Mac

Editing I

7 shortcuts
  • ⌥DOWN
    Move line down
  • ⌥UP
    Move line up
  • ⌥⇧DOWN
    Copy line down
  • ⌥⇧UP
    Copy line up
  • ⌘⇧K
    Delete line
  • ⌘↵
    Insert line below
  • ⌘⇧↵
    Insert line above

Editing II

7 shortcuts
  • ⌘⇧\
    Jump to matching bracket
  • ⌘]
    Indent line
  • ⌘[
    Outdent line
  • ⌘UP
    Go to beginning of file
  • ⌘DOWN
    Go to end of file
  • ⌘⌥[
    Fold region
  • ⌘⌥]
    Unfold region

Editing III

7 shortcuts
  • ⌘K⌘[
    Fold all subregions
  • ⌘K⌘]
    Unfold all subregions
  • ⌘K⌘0
    Fold all regions
  • ⌘K⌘J
    Unfold all regions
  • ⌘/
    Toggle line comment
  • ⌥⇧A
    Toggle block comment
  • ⌥Z
    Toggle word wrap

Multi-cursor / Selection I

7 shortcuts
  • ⌘⌥UP
    Insert cursor above
  • ⌘⌥DOWN
    Insert cursor below
  • ⌘U
    Undo last cursor operation
  • ⌥⇧I
    Insert cursor at end of each line selected
  • ⌘L
    Select current line
  • ⌘⇧L
    Select all occurrences of current selection
  • ⌘F2
    Select all occurrences of current word

Multi-cursor / Selection II

6 shortcuts
  • ⌘^⇧RIGHT
    Expand selection
  • ⌘^⇧LEFT
    Shrink selection
  • ⌘⌥⇧UP
    Column box selection up
  • ⌘⌥⇧DOWN
    Column box selection down
  • ⌘⌥⇧RIGHT
    Column box selection right
  • ⌘⌥⇧LEFT
    Column box selection left

Search / Replace I

7 shortcuts
  • ⌘F
    Find
  • ⌘⌥F
    Replace
  • ⌘G
    Find next
  • ⌘⇧G
    Find previous
  • ⌘D
    Add selection to next Find match
  • ⌥↵
    Select all occurrences of Find match
  • ⌘K⌘D
    Move last selection to next Find match

Rich Languages Editing I

6 shortcuts
  • ^SPACE
    Trigger suggestion
  • ⌘⇧SPACE
    Trigger parameter hints
  • ⌥⇧F
    Format document
  • ⌘K⌘F
    Format selection
  • F12
    Go to definition
  • ⌥F12
    Peek definition

Rich Languages Editing II

6 shortcuts
  • ⌘KF12
    Open definition to the side
  • ⌘.
    Quick fix
  • ⇧F12
    Show references
  • F2
    Rename symbol
  • ⌘K⌘X
    Trim trailing whitespace
  • ⌘KM
    Change file language

Navigation I

9 shortcuts
  • ^G
    Go to line...
  • ⌘P
    Go to file...
  • ⌘⇧O
    Go to symbol...
  • ⌘⇧M
    Show problems panel
  • F8
    Go to next error or warning
  • ⇧F8
    Go to previous error or warning
  • ^-
    Go back
  • ^⇧-
    Go forward
  • ^⇧M
    Toggle tab moves focus

Editor Management I

9 shortcuts
  • ⌘KF
    Close folder
  • ⌘\
    Split editor
  • ⌘1
    Focus info 1st editor window
  • ⌘2
    Focus into 2nd editor window
  • ⌘3
    Focus into 3rd editor window
  • ⌘K⌘LEFT
    Focus into previous editor window
  • ⌘K⌘RIGHT
    Focus into next editor window
  • ⌘K⌘⇧LEFT
    Move editor window left
  • ⌘K⌘⇧RIGHT
    Move editor window right

VSCode shortcuts for Windows

Editing I

7 shortcuts
  • ^⇧↵
    Insert line above
  • ^↵
    Insert line below
  • ^⇧K
    Delete line
  • ⌥⇧UP
    Copy line up
  • ⌥⇧DOWN
    Copy line down
  • ⌥UP
    Move line up
  • ⌥DOWN
    Move line down

Editing II

5 shortcuts
  • ^⇧]
    Unfold region
  • ^⇧[
    Fold region
  • ^[
    Outdent line
  • ^]
    Indent line
  • ^⇧\
    Jump to matching bracket

Editing III

7 shortcuts
  • ⌥Z
    Toggle word wrap
  • ⌥⇧A
    Toggle block comment
  • ^/
    Toggle line comment
  • ^K^J
    Unfold all regions
  • ^K^0
    Fold all regions
  • ^K^]
    Unfold all subregions
  • ^K^[
    Fold all subregions

Multi-cursor / Selection I

6 shortcuts
  • ^⇧L
    Select all occurrences of current selection
  • ^L
    Select current line
  • ⌥⇧I
    Insert cursor at end of each line selected
  • ^U
    Undo last cursor operation
  • ^⌥DOWN
    Insert cursor below
  • ^⌥UP
    Insert cursor above

Multi-cursor / Selection II

6 shortcuts
  • ^⌥⇧LEFT
    Column box selection left
  • ^⌥⇧RIGHT
    Column box selection right
  • ^⌥⇧DOWN
    Column box selection down
  • ^⌥⇧UP
    Column box selection up
  • ⌥⇧LEFT
    Shrink selection
  • ⌥⇧RIGHT
    Expand selection

Search / Replace I

7 shortcuts
  • ^K^D
    Move last selection to next Find match
  • ⌥↵
    Select all occurrences of Find match
  • ^D
    Add selection to next Find match
  • ⇧F3
    Find previous
  • F3
    Find next
  • ^H
    Replace
  • ^F
    Find

Rich Languages Editing I

6 shortcuts
  • ⌥F12
    Peek definition
  • F12
    Go to definition
  • ^K^F
    Format selection
  • ⌥⇧F
    Format document
  • ^⇧SPACE
    Trigger parameter hints
  • ^SPACE
    Trigger suggestion

Rich Languages Editing II

6 shortcuts
  • ^KM
    Change file language
  • ^K^X
    Trim trailing whitespace
  • F2
    Rename symbol
  • ⇧F12
    Show references
  • ^.
    Quick fix
  • ^KF12
    Open definition to the side

Navigation I

9 shortcuts
  • ^M
    Toggle tab moves focus
  • ⌥RIGHT
    Go forward
  • ⌥LEFT
    Go back
  • ⇧F8
    Go to previous error or warning
  • F8
    Go to next error or warning
  • ^⇧M
    Show problems panel
  • ^⇧O
    Go to symbol...
  • ^P
    Go to file...
  • ^G
    Go to line...

Editor Management I

5 shortcuts
  • ^3
    Focus into 3rd editor window
  • ^2
    Focus into 2nd editor window
  • ^1
    Focus info 1st editor window
  • ^\
    Split editor
  • ^KF
    Close folder