Cheatsheet

VSCode shortcuts

The ones I actually use, on Ubuntu. Not all of them: VSCode ships hundreds and twenty is what makes the difference.

45 shortcuts

The ones marked like this are not defaults — they are the ones worth copying.

My own

  • CtrlShiftAltGNew git branch, or check one outmine
  • CtrlShiftAltQDelete a git branchmine
  • CtrlDDuplicate the line downwardsmineReassigned: by default this selects the word, and pressing it again selects the next one.
  • Ctrl↑Jump ten lines upmine
  • Ctrl↓Jump ten lines downmine
  • CtrlShift1Show or hide the sidebarmine
  • Ctrl1Focus the sidebar — again to close itmine
  • CtrlAltBShow or hide the activity barmine
  • CtrlNNew file, when the explorer has focusmineIn the editor it still opens an untitled file.
  • CtrlShiftAlt.Toggle DevToolsmine
  • CtrlShiftAltWThe chat panelmine
  • CtrlBShow or hide the sidebarmineThe default, but it only works because four other commands were unbound from this key.

Getting around

  • CtrlPOpen a file by name
  • CtrlShiftPCommand palette
  • CtrlGGo to line number
  • Home/EndStart and end of the line
  • CtrlHome/CtrlEndStart and end of the file
  • F8/ShiftF8Next and previous error
  • CtrlKCtrl0Fold everything in the file

Panels and windows

  • Ctrl`Toggle the terminal
  • CtrlShift`A second terminal
  • CtrlShiftMProblems panel
  • CtrlShiftEExplorer
  • CtrlShiftDDebugger
  • Ctrl,Settings
  • CtrlShiftTReopen the tab you just closed
  • CtrlKShiftEnterPin the tab
  • CtrlKZZen mode
  • CtrlKTTry out themes
  • CtrlKFClose the workspace
  • CtrlShiftNNew window
  • CtrlShiftWClose the window
  • Super↑↓←→Snap the window around the screenThis one is Ubuntu, not VSCode — it works on any window.

Words

  • CtrlFFind in this file
  • CtrlShiftFFind across the project
  • CtrlHReplace

Lines

  • CtrlLSelect the line
  • CtrlShiftKDelete the line
  • Alt↑/Alt↓Move the line up or down
  • CtrlEnterNew line below, wherever the cursor is
  • CtrlShiftEnterNew line above
  • Ctrl/Comment the selected lines
  • CtrlShiftABlock comment
  • AltClickA second cursor wherever you click
  • CtrlShiftLA cursor on every match at once

↑↓ move · ↵ open · esc close