You are currently viewing Visual Studio Code Editor Shortcut Keys

Visual Studio Code Editor Shortcut Keys

Visual Studio Code Editor Shortcut Keys

Here are some common Visual Studio Code (VS Code) shortcut keys for Windows and macOS:


General

Action Windows / Linux macOS
Command Palette Ctrl + Shift + P Cmd + Shift + P
Open File Ctrl + P Cmd + P
Save File Ctrl + S Cmd + S
Close Editor Ctrl + W Cmd + W

Editing

Action Windows / Linux macOS
Cut Line Ctrl + X Cmd + X
Copy Line Ctrl + C Cmd + C
Move Line Up/Down Alt + Up/Down Option + Up/Down
Duplicate Line Shift + Alt + Down Shift + Option + Down
Format Document Shift + Alt + F Shift + Option + F
Comment/Uncomment Line Ctrl + / Cmd + /

Navigation

Action Windows / Linux macOS
Go to Line Ctrl + G Cmd + G
Go to Definition F12 F12
Peek Definition Alt + F12 Option + F12
Toggle Sidebar Ctrl + B Cmd + B

Search & Replace

Action Windows / Linux macOS
Find Ctrl + F Cmd + F
Replace Ctrl + H Cmd + H
Find in Files Ctrl + Shift + F Cmd + Shift + F

Web development course