Keyboard Shortcuts

VS Code, Chrome DevTools, macOS and Windows. The shortcuts that actually save time.

34 shortcuts

Tool

OS

34 shortcuts

Access every VS Code command by name. The single most important shortcut.

vscode
mac
CmdShiftP
win
CtrlShiftP

Jump to any file instantly by typing part of its name.

vscode
mac
CmdP
win
CtrlP

Open or close the terminal without leaving VS Code.

vscode
mac
Ctrl`
win
Ctrl`

Select next occurrence of current word. Repeat to keep selecting. Edit all at once.

vscode
mac
CmdD
win
CtrlD

Select every instance of the highlighted word at once.

vscode
mac
CmdShiftL
win
CtrlShiftL

Move the current line or selection up or down without cut-paste.

vscode
mac
Option
win
Alt

Copy the current line directly below itself.

vscode
mac
ShiftOption
win
ShiftAlt

Delete the entire current line in one keystroke.

vscode
mac
CmdShiftK
win
CtrlShiftK

Rename a variable, function, or class everywhere it is used across all files.

vscode
mac
F2
win
F2

Jump to where a function or variable is defined.

vscode
mac
F12 or CmdClick
win
F12 or CtrlClick

Auto-format the entire file using Prettier or your configured formatter.

vscode
mac
ShiftOptionF
win
ShiftAltF

Comment or uncomment the current line or selection.

vscode
mac
Cmd
win
Ctrl

Open a second editor panel side by side.

vscode
mac
Cmd\
win
Ctrl\

Hide or show the file explorer sidebar for more screen space.

vscode
mac
CmdB
win
CtrlB

Search across your entire project.

vscode
mac
CmdShiftF
win
CtrlShiftF

Fullscreen, UI-free coding mode. Press Escape twice to exit.

vscode
mac
CmdK Z
win
CtrlK Z

Collapse or expand a code block to reduce visual noise.

vscode
mac
CmdOption[]
win
CtrlShift[]

Increase or decrease indentation for the current line or selection.

vscode
mac
Cmd][
win
Ctrl][

Open Chrome Developer Tools. F12 also works.

chrome
mac
CmdOptionI
win
CtrlShiftI

Jump straight to the Console without clicking through tabs.

chrome
mac
CmdOptionJ
win
CtrlShiftJ

Click any element on the page to inspect it in the Elements panel.

chrome
mac
CmdOptionC
win
CtrlShiftC

Reload the page and bypass all cached assets.

chrome
mac
CmdShiftR
win
CtrlShiftR

Jump to the address bar instantly. Type and press Enter to navigate.

chrome
mac
CmdL
win
CtrlL

Reopen the most recently closed tab. Can be pressed multiple times.

chrome
mac
CmdShiftT
win
CtrlShiftT

Simulate a mobile screen to test responsive layouts.

chrome
mac
CmdShiftM (in DevTools)
win
CtrlShiftM (in DevTools)

Run any DevTools command by name — disable JS, take screenshot, performance trace.

chrome
mac
CmdShiftP (in DevTools)
win
CtrlShiftP (in DevTools)

Open Spotlight to launch apps, find files, do quick maths, and convert units.

mac
mac
CmdSpace
win
Windows key

Drag to capture a specific region of your screen.

mac
mac
CmdShift4
win
WindowsShiftS

Cycle through open applications. Hold and keep tapping Tab to keep cycling.

mac
mac
CmdTab
win
AltTab

Open Force Quit dialog to kill unresponsive applications.

mac
mac
CmdOptionEsc
win
CtrlShiftEsc

Lock your screen immediately.

mac
mac
CmdCtrlQ
win
WindowsL

Open the emoji and symbol picker in any text field.

mac
mac
CmdCtrlSpace
win
Windows.

See all open windows and virtual desktops at once.

mac
mac
Ctrl
win
WindowsTab

Fully quit an app — not just close the window.

mac
mac
CmdQ
win
AltF4