## VSCode text editing shortcuts cheat sheet VSCode comes with a gazillion shortcuts. Learning and using them is a true power-up but it's hard to know where to start. Here's a cheat sheet with some general shortcuts and simple text manipulations. Nothing code related. No programming language specifics. These are the vanilla defaults that ships with VSCode. I think some are even macOS defaults and not unique to VSCode. > NOTE: Windows users will *probably* be able to swap command (⌘) for ctrl (^) in most cases, but I don't have access to Windows at the moment so i can't verify that. Some shortcuts are double, in that you press a first set and then a modifier. Most notably `⌘K` works like that, as well as some markdown extensions who uses `^M` as their initial key combination. Double shortcuts are marked with a comma, which means that first you press the combination before the comma and then the second character(s). If a double command uses the command key twice, you can usually just keep holding down the command key while pressing down the first and the second letter in the combination. ### General commands and UI | | | |-----------------------------------------|:------| | Command Palette | ⇧⌘ P | | Toggle left sidebar | ⌘ B | | Toggle bottom panel | ⌘ J | | Toggle zen mode (full screen no panels) | ⌘K, Z | | Show search panel | ⇧⌘ F | | Show file explorer | ⇧⌘ E | | | | ### Document navigation and cursors A symbol will be the headings in markdown files. So by navigating to symbols, you will be able to jump to a specific header - both in the same document as well as to any header in any file in your workspace. | | | |------------------------------|:---------------------------| | Go to symbol in Document | ⇧⌘ O | | Go to symbol in Workspace | ⌘ T | | Navigate character | arrows right or left | | Navigate word by word | ⌥ + arrows right or left | | Navigate to line start | ⌘ ← | | Navigate to line end | ⌘ → | | Select character | ⇧ + arrows right or left | | Select word by word | ⇧ ⌥ + arrows right or left | | Select to line start | ⇧⌘ ← | | Select to line end | ⇧⌘ → | | Toggle folding current block | ⌘K, ⌘L | | Fold all | ⌘K, ⌘0 | | Unfold all | ⌘K, ⌘J | | Multiple cursors | ⌥ + click | | Add cursor above | ⌥ ⌘ ↑ | | Add cursor below | ⌥ ⌘ ↓ | ### Text manipulation | | | |----------------------------------------------------|:---------| | Move line up | ⌥ ↑ | | Move line down | ⌥ ↓ | | Duplicate line down | ⇧⌥ ↓ | | Duplicate line up | ⇧⌥ ↑ | | Delete line | ⇧⌘K | | Insert line above | ⇧⌘ Enter | | Insert line below | ⌘ Enter | | Join lines *(removes line break at the end of line)* | ^ J |