Skip to main content

VS Code Shortcuts

Essential keyboard shortcuts for Visual Studio Code

Editor

General

Cmd/Ctrl + Shift + P

Command Palette

Cmd/Ctrl + P

Quick Open file

Cmd/Ctrl + ,

Open Settings

Cmd/Ctrl + `

Toggle Terminal

Cmd/Ctrl + B

Toggle Sidebar

Cmd/Ctrl + Shift + E

Explorer

Cmd/Ctrl + Shift + F

Search in files

Editing

Cmd/Ctrl + X

Cut line

Cmd/Ctrl + C

Copy line

Alt + Up/Down

Move line up/down

Shift + Alt + Up/Down

Duplicate line

Cmd/Ctrl + Shift + K

Delete line

Cmd/Ctrl + /

Toggle comment

Cmd/Ctrl + D

Select next occurrence

Cmd/Ctrl + Shift + L

Select all occurrences

Multi-Cursor

Alt + Click

Insert cursor

Cmd/Ctrl + Alt + Up/Down

Add cursor above/below

Cmd/Ctrl + U

Undo cursor

Shift + Alt + I

Cursor at end of lines

Navigation

Cmd/Ctrl + G

Go to line

Cmd/Ctrl + Shift + O

Go to symbol

F12

Go to definition

Alt + F12

Peek definition

Shift + F12

Find references

Cmd/Ctrl + Tab

Switch editor

Refactoring

F2

Rename symbol

Cmd/Ctrl + .

Quick Fix

Shift + Alt + F

Format document

Cmd/Ctrl + K Cmd/Ctrl + F

Format selection

View & Panels

Cmd/Ctrl + \

Split editor

Cmd/Ctrl + 1/2/3

Focus editor group

Cmd/Ctrl + W

Close editor

Cmd/Ctrl + K Z

Zen mode

Cmd/Ctrl + J

Toggle panel

Privacy-First Developer Toolkits - 35+ Browser-Based Tools