Cheat sheets / VS Code
VS Code Keyboard Shortcuts for Windows
The 72 default Visual Studio Code shortcuts worth knowing on Windows, grouped by what you are doing. Type in the filter to find one fast.
This page also works as a hotkey overlay. Hold Ctrl+Space to see it, let go to hide it. What is this?
General
- Command Palette Ctrl+Shift+P
- Go to file Ctrl+P
- Settings Ctrl+,
- Keyboard shortcuts Ctrl+KCtrl+S
- Open recent Ctrl+R
- New window Ctrl+Shift+N
Files and tabs
- New file Ctrl+N
- Save Ctrl+S
- Save all Ctrl+KS
- Close tab Ctrl+W
- Reopen closed tab Ctrl+Shift+T
- Switch tab Ctrl+Tab
Edit lines
- Move line Alt+↑/↓
- Copy line Shift+Alt+↑/↓
- Delete line Ctrl+Shift+K
- New line below Ctrl+Enter
- New line above Ctrl+Shift+Enter
- Toggle comment Ctrl+/
Multi-cursor
- Add a cursor Alt+Click
- Cursor above / below Ctrl+Alt+↑/↓
- Select next match Ctrl+D
- Skip this match Ctrl+KCtrl+D
- Select all matches Ctrl+Shift+L
- Undo last cursor Ctrl+U
Select
- Select line Ctrl+L
- Expand selection Shift+Alt+→
- Shrink selection Shift+Alt+←
- Box selection Shift+Alt+Drag
- Cursor on each line end Shift+Alt+I
- Select all Ctrl+A
Find and replace
- Find Ctrl+F
- Replace Ctrl+H
- Next / previous F3/Shift+F3
- Select every result Alt+Enter
- Search all files Ctrl+Shift+F
- Replace in files Ctrl+Shift+H
Write code
- Suggestions Ctrl+Space
- Quick fix Ctrl+.
- Rename symbol F2
- Format document Shift+Alt+F
- Format selection Ctrl+KCtrl+F
- Block comment Shift+Alt+A
Fold and fix
- Fold / unfold Ctrl+Shift+[/]
- Fold all Ctrl+KCtrl+0
- Unfold all Ctrl+KCtrl+J
- Next / previous problem F8/Shift+F8
- Problems panel Ctrl+Shift+M
- Jump to bracket Ctrl+Shift+\
Layout
- Split editor Ctrl+\
- Focus editor group Ctrl+1/2/3
- Toggle sidebar Ctrl+B
- Toggle bottom panel Ctrl+J
- Zen mode Ctrl+KZ
- Toggle word wrap Alt+Z
Terminal and views
- Toggle terminal Ctrl+`
- New terminal Ctrl+Shift+`
- Explorer Ctrl+Shift+E
- Source control Ctrl+Shift+G
- Extensions Ctrl+Shift+X
- Run and debug Ctrl+Shift+D
Debug
- Start / continue F5
- Stop Shift+F5
- Restart Ctrl+Shift+F5
- Toggle breakpoint F9
- Step over F10
- Step into / out F11/Shift+F11
No shortcuts match .
These are the defaults on Windows. To see or change any of them, press Ctrl+K Ctrl+S in VS Code. On a Mac, Ctrl is usually Cmd and Alt is Option.
Keep this cheat sheet on a hotkey
BrainRAM is a small free app for Windows. Hold Ctrl+Space and this page appears on top of whatever you are doing. Let go and it's gone. Glance, let go, carry on.
Every group sits in the same place each time, so after a few days you stop reading and just glance at the spot.
BrainRAM's default hotkey is Ctrl+Space, which VS Code also uses for suggestions. Pick a different one in BrainRAM's Settings, under Hotkey.
- Download BrainRAM Free, no account, works offline. The installer isn't code-signed yet, so Windows shows a blue warning: click More info, then Run anyway.
- Add this page to BrainRAM Opens BrainRAM with this page ready to import.
BrainRAM runs on Windows today. The macOS and Linux versions are on the way.
Email me when mine is ready