VS Code Shortcuts Cheat Sheet

Essential keyboard shortcuts for Visual Studio Code. Editing, navigation, search, terminal, debugging, and Git integration.

General

MacWindows / LinuxDescription
Cmd+Shift+PCtrl+Shift+PCommand Palette
Cmd+PCtrl+PQuick Open file
Cmd+Shift+NCtrl+Shift+NNew window
Cmd+WCtrl+WClose editor tab
Cmd+,Ctrl+,Open Settings
Cmd+K Cmd+SCtrl+K Ctrl+SKeyboard Shortcuts
Cmd+SCtrl+SSave file
Cmd+ZCtrl+ZUndo
Cmd+Shift+ZCtrl+Shift+ZRedo

Editing

MacWindows / LinuxDescription
Cmd+XCtrl+XCut line (no selection needed)
Cmd+CCtrl+CCopy line (no selection needed)
Option+Up/DownAlt+Up/DownMove line up/down
Shift+Option+Up/DownShift+Alt+Up/DownCopy line up/down
Cmd+Shift+KCtrl+Shift+KDelete line
Cmd+EnterCtrl+EnterInsert line below
Cmd+Shift+EnterCtrl+Shift+EnterInsert line above
Cmd+Shift+\Ctrl+Shift+\Jump to matching bracket
Cmd+] / Cmd+[Ctrl+] / Ctrl+[Indent / outdent line
Cmd+/Ctrl+/Toggle line comment
Shift+Option+AShift+Alt+AToggle block comment
Cmd+DCtrl+DSelect word (repeat for next occurrence)
Cmd+LCtrl+LSelect current line
Shift+Option+FShift+Alt+FFormat document
Cmd+K Cmd+FCtrl+K Ctrl+FFormat selection
F2F2Rename symbol

Multi-Cursor

MacWindows / LinuxDescription
Option+ClickAlt+ClickAdd cursor at click position
Cmd+Option+Up/DownCtrl+Alt+Up/DownAdd cursor above/below
Cmd+DCtrl+DSelect next occurrence of word
Cmd+Shift+LCtrl+Shift+LSelect all occurrences of word
Cmd+K Cmd+DCtrl+K Ctrl+DSkip current and select next occurrence
EscEscCancel multi-cursor

Terminal

MacWindows / LinuxDescription
Ctrl+`Ctrl+`Toggle terminal panel
Ctrl+Shift+`Ctrl+Shift+`Create new terminal
Cmd+\Ctrl+\Split terminal
Cmd+Up/DownCtrl+Up/DownScroll terminal

Debugging

MacWindows / LinuxDescription
F5F5Start / continue debugging
Shift+F5Shift+F5Stop debugging
F9F9Toggle breakpoint
F10F10Step over
F11F11Step into
Shift+F11Shift+F11Step out