VS Code logoVS CodeBEGINNER

VS Code Shortcuts

VS Code keyboard shortcuts cheat sheet for Windows and Mac — editing, navigation, debugging, and terminal commands for productivity.

5 min read
vscodeshortcutskeyboardproductivitywindowsmac
First page of the VS Code Shortcuts PDF cheat sheet

PDF · 2 pages

VS Code Shortcuts PDF cheat sheet

A two-page VS Code Shortcuts reference for printing or offline use.

Open PDF

General

Essential VS Code shortcuts for navigation and commands

Command Palette

Open command palette to access all VS Code commands

💡 Access to all VS Code commands and extensions
WINCtrl+Shift+P
MAC⌘+Shift+P

Quick Open File

Quickly open files by name

💡 Type filename to quickly navigate
WINCtrl+P
MAC⌘+P

Settings

Open VS Code settings

💡 Access user and workspace settings
WINCtrl+,
MAC⌘+,

Toggle Sidebar

Show/hide the sidebar

💡 Maximize editing space
WINCtrl+B
MAC⌘+B

Toggle Terminal

Show/hide integrated terminal

💡 Access command line without leaving editor
WINCtrl+`
MAC⌃+`

Editing

Text editing and manipulation shortcuts

Copy Line Up/Down

Duplicate current line above or below

💡 Duplicate entire lines quickly
WINShift+Alt+↑/↓
MAC⇧+⌥+↑/↓

Move Line Up/Down

Move current line up or down

💡 Reorder code without cut and paste
WINAlt+↑/↓
MAC⌥+↑/↓

Delete Line

Delete entire current line

💡 Remove entire line regardless of cursor position
WINCtrl+Shift+K
MAC⌘+Shift+K

Insert Line Below

Insert new line below current line

💡 Create new line without moving cursor to end
WINCtrl+Enter
MAC⌘+Enter

Toggle Line Comment

Comment/uncomment current line or selection

💡 Language-aware commenting
WINCtrl+/
MAC⌘+/

Navigation

File and code navigation shortcuts

Go to Line

Jump to specific line number

💡 Enter line number to jump directly
WINCtrl+G
MAC⌃+G

Go to Symbol

Navigate to symbols in current file

💡 Search functions, classes, variables
WINCtrl+Shift+O
MAC⌘+Shift+O

Go to Definition

Jump to symbol definition

💡 Navigate to where symbol is defined
WINF12
MACF12

Go Back/Forward

Navigate back and forward through cursor history

💡 Browser-like navigation through code
WINAlt+←/→
MAC⌃+-/⌃+⇧+-

Switch Editor

Cycle through open editor tabs

💡 Quick switcher for open files
WINCtrl+Tab
MAC⌃+Tab

Search & Replace

Finding and replacing text across files

Find

Search in current file

💡 Basic text search in current file
WINCtrl+F
MAC⌘+F

Replace

Search and replace in current file

💡 Find and replace with preview
WINCtrl+H
MAC⌥+⌘+F

Find in Files

Search across all files in workspace

💡 Project-wide search
WINCtrl+Shift+F
MAC⌘+Shift+F

Replace in Files

Search and replace across all files

💡 Project-wide find and replace
WINCtrl+Shift+H
MAC⌘+Shift+H

Find Next/Previous

Navigate through search results

💡 Cycle through search matches
WINF3/Shift+F3
MACF3/⇧+F3

Multi-cursor & Selection

Advanced text selection and editing

Add Cursor Above/Below

Add cursor to line above or below

💡 Edit multiple lines simultaneously
WINCtrl+Alt+↑/↓
MAC⌘+⌥+↑/↓

Select All Occurrences

Select all instances of current word

💡 Multi-cursor for all matching text
WINCtrl+Shift+L
MAC⌘+Shift+L

Select Next Occurrence

Add next occurrence to selection

💡 Gradually select matching instances
WINCtrl+D
MAC⌘+D

Add Cursor to Line Ends

Add cursor to end of each selected line

💡 Edit multiple line endings
WINShift+Alt+I
MAC⇧+⌥+I

Expand/Shrink Selection

Intelligently expand or shrink selection

💡 Smart selection based on syntax
WINShift+Alt+→/←
MAC⌃+⇧+→/←

Debug & Terminal

Debugging and integrated terminal shortcuts

Start Debugging

Start debugging session

💡 Launch configured debugger
WINF5
MACF5

Toggle Breakpoint

Add or remove breakpoint on current line

💡 Set breakpoints for debugging
WINF9
MACF9

Step Over

Execute current line and move to next

💡 Step through code line by line
WINF10
MACF10

New Terminal

Create new terminal instance

💡 Multiple terminal sessions
WINCtrl+Shift+`
MAC⌃+⇧+`

Focus Terminal

Switch focus to terminal panel

💡 Toggle between editor and terminal
WINCtrl+`
MAC⌃+`