Skip to main content

VSCode Keyboard Shortcut Cheat Sheet

vscode
Published

Friday, December 23, 2022

The most useful VSCode shotcuts that can boost my productivity!

Description Mac Windows
General
Command Palette Cmd + Shift + P Ctrl + Shift + P
Open settings Cmd + , Ctrl + ,
Keyboard shoutcuts Cmd + K Cmd + S Ctrl + K Ctrl + S
Toggle sidebar Cmd + B Ctrl + B
Open new window Cmd + Shift + N Ctrl + Shift + N
Close window Cmd + Shift + W Ctrl + Shift + W
Close tab Cmd + W Ctrl + W
Open the terminal Cmd + J Ctrl + J
Editor
Split view Cmd + \ Ctrl + \
Navigate tabs Cmd + Shift + Tab Ctrl + Shift + Tab
Navigate tab groups Cmd + 1 / 2 / 3 Ctrl + 1 / 2 / 3
Multiple cursor Cmd + Opt + ↑ / ↓ Cmd + Opt + ↑ / ↓
Select text Cmd + Shift + ↑ / ↓ Ctrl + Shift + ↑ / ↓
Delete previous word Cmd + Backspace Ctrl + Backspace
Move the line Up / Down Opt + ↑ / ↓ Alt + ↑ / ↓
Copy line Up / Down Shift + Opt + ↑ / ↓ Shift + Alt + ↑ / ↓
Select word Cmd + D Ctrl + D
Select current line Cmd + L Ctrl + L
Select similar occurrences Cmd + Shift + L Ctrl + Shift + L
Delete current line Cmd + Shift + K Ctrl + Shift + K
Comment lines Cmd + / Ctrl + /
Navigate to line Cmd + G Ctrl + G
Code folding Cmd + Opt + [ / ] Ctrl + Shift + [ / ]
Indent / outdent lines Cmd + [ / ] Ctrl + [ / ]
Format selected code Cmd + K Cmd + F Ctrl + K Ctrl + F
Format document Shift + Opt + F Shift + Alt + F
Go to the start / end of the word Opt + ← / → Alt + ← / →
Go to the start / end of the line Cmd + ← / → Ctrl + ← / →
Go to beginning or end of file Cmd + ↑ / ↓ Ctrl + ↑ / ↓
Search and Replace
Search files Cmd + Shift + F Ctrl + Shift + F
Find text Cmd + F Ctrl + F
Replace text Cmd + Opt + F Ctrl + H
Back to top