VS Code Keyboard Shortcuts

Visual Studio Code keyboard shortcut reference covering 160 bindings for Windows, Mac & Linux. Commonly searched bindings include Open Command Palette, Quick Open, and Toggle Comment. 160 of 160 shortcuts are verified against official Visual Studio Code documentation, each with a linked source when available. Search by action name, filter by category, look up what a key combination does, print a cheat sheet, or practice with flashcards.

Official Visual Studio Code documentation

Debug

ActionDescriptionWindowsMacVerifiedSource
Debug Show Run and Debug panel Ctrl+Shift+D Cmd+Shift+D Windows, macOS, Linux Source
Start Debugging Start or continue debugging F5 F5 Windows, macOS, Linux Source
Toggle Breakpoint Add or remove breakpoint F9 F9 Windows, macOS, Linux Source
Step Over Step over during debug F10 F10 Windows, macOS, Linux Source
Step Into Step into during debug F11 F11 Windows, macOS, Linux Source
Step Out Step out during debug Shift+F11 Shift+F11 Windows, macOS, Linux Source
Run Without Debug Run without debugging Ctrl+F5 Ctrl+F5 Windows, macOS, Linux Source
Next Error Go to next error F8 F8 Windows, macOS, Linux Source
Previous Error Go to previous error Shift+F8 Shift+F8 Windows, macOS, Linux Source
Problems Panel Show Problems panel Ctrl+Shift+M Cmd+Shift+M Windows, macOS, Linux Source
Run Build Task Run default build task Ctrl+Shift+B Cmd+Shift+B Windows, macOS, Linux Source
Pause Debugging Pause running debug session F6 F6 Windows, macOS, Linux Source

Editing

ActionDescriptionWindowsMacVerifiedSource
Toggle Comment Comment or uncomment line Ctrl+/ Cmd+/ Windows, macOS, Linux Source
Multi-cursor Add cursor at click position Alt+Click Option+Click Windows, macOS, Linux Source
Rename Symbol Rename symbol across project F2 F2 Windows, macOS, Linux Source
Move Line Up Alt+Up Option+Up Windows, macOS, Linux Source
Move Line Down Alt+Down Option+Down Windows, macOS, Linux Source
Copy Line Up Duplicate line above Shift+Alt+Up Shift+Option+Up Windows, macOS, Linux Source
Copy Line Down Duplicate line below Shift+Alt+Down Shift+Option+Down Windows, macOS, Linux Source
Delete Line Delete current line Ctrl+Shift+K Cmd+Shift+K Windows, macOS, Linux Source
Insert Line Below Insert line below cursor Ctrl+Enter Cmd+Enter Windows, macOS, Linux Source
Insert Line Above Insert line above cursor Ctrl+Shift+Enter Cmd+Shift+Enter Windows, macOS, Linux Source
Indent Line Indent line or selection Ctrl+] Cmd+] Windows, macOS, Linux Source
Outdent Line Outdent line or selection Ctrl+[ Cmd+[ Windows, macOS, Linux Source
Trigger Suggestion Show IntelliSense Ctrl+Space Ctrl+Space Windows, macOS, Linux Source
Parameter Hints Show parameter info Ctrl+Shift+Space Cmd+Shift+Space Windows, macOS, Linux Source
Accept Suggestion Accept IntelliSense suggestion Tab Tab Windows, macOS, Linux Source
Close Suggestion Dismiss suggestion widget Escape Escape Windows, macOS, Linux Source
Undo Undo last edit Ctrl+Z Cmd+Z Windows, macOS, Linux Source
Redo Redo last edit Ctrl+Y Cmd+Shift+Z Windows, macOS, Linux Source
Cut Cut selection Ctrl+X Cmd+X Windows, macOS, Linux Source
Copy Copy selection Ctrl+C Cmd+C Windows, macOS, Linux Source
Paste Paste from clipboard Ctrl+V Cmd+V Windows, macOS, Linux Source
Block Comment Toggle block comment Shift+Alt+A Shift+Option+A Windows, macOS, Linux Source
Add Line Comment Add line comment without toggling Ctrl+K then Ctrl+C Cmd+K then Cmd+C Windows, macOS, Linux Source
Remove Line Comment Remove line comment without toggling Ctrl+K then Ctrl+U Cmd+K then Cmd+U Windows, macOS, Linux Source
Toggle Tab Focus Mode Toggle Tab key focus vs indentation Ctrl+M Ctrl+Shift+M Windows, macOS, Linux Source
Quick Fix Show code actions and quick fixes Ctrl+. Cmd+. Windows, macOS, Linux Source
Replace with Next Value Cycle selection through suggested values Ctrl+Shift+. Cmd+Shift+. Windows, macOS, Linux Source
Replace with Previous Value Cycle selection to previous suggested value Ctrl+Shift+, Cmd+Shift+, Windows, macOS, Linux Source
Join Lines Join selected lines into one Ctrl+J Ctrl+J Windows, macOS, Linux Source

File

ActionDescriptionWindowsMacVerifiedSource
Explorer Show Explorer panel Ctrl+Shift+E Cmd+Shift+E Windows, macOS, Linux Source
New File Create new file Ctrl+N Cmd+N Windows, macOS, Linux Source
Open File Open file dialog Ctrl+O Cmd+O Windows, macOS, Linux Source
Save Save current file Ctrl+S Cmd+S Windows, macOS, Linux Source
Save All Save all open files Ctrl+K then S Option+Cmd+S Windows, macOS, Linux Source
Open Folder Open a folder as workspace Ctrl+K then Ctrl+O Cmd+O Windows, macOS, Linux Source
Open Recent Open recently used folders or workspaces Ctrl+R Ctrl+R Windows, macOS, Linux Source
Save As Save active file with a new name Ctrl+Shift+S Cmd+Shift+S Windows, macOS, Linux Source
Close Folder Close the current folder workspace Ctrl+K then F Cmd+K then F Windows, macOS, Linux Source
Copy Path Copy absolute path of active file Ctrl+K then P Cmd+K then P Windows, macOS, Linux Source
Reveal in Explorer Reveal active file in system file explorer Ctrl+K then R Cmd+K then R Windows, macOS, Linux Source
Compare with Saved Diff active file against saved version Ctrl+K then D Cmd+K then D Windows, macOS, Linux Source
Change Language Mode Change language mode of active file Ctrl+K then M Cmd+K then M Windows, macOS, Linux Source

Formatting

ActionDescriptionWindowsMacVerifiedSource
Format Document Format entire document Shift+Alt+F Shift+Option+F Windows, macOS, Linux Source
Format Selection Format selected code Ctrl+K then Ctrl+F Cmd+K then Cmd+F Windows, macOS, Linux Source
Trim Trailing Whitespace Remove trailing whitespace in file Ctrl+K then Ctrl+X Cmd+K then Cmd+X Windows, macOS, Linux Source

General

ActionDescriptionWindowsMacVerifiedSource
Open Command Palette Access all VS Code commands Ctrl+Shift+P Cmd+Shift+P Windows, macOS, Linux Source
Extensions Show Extensions panel Ctrl+Shift+X Cmd+Shift+X Windows, macOS, Linux Source
Keyboard Shortcuts Open keyboard shortcuts editor Ctrl+K then Ctrl+S Cmd+K then Cmd+S Windows, macOS, Linux Source
Show All Commands Show all available commands Ctrl+Shift+P Cmd+Shift+P Windows, macOS, Linux Source
Open Settings Open Settings editor Ctrl+, Cmd+, Windows, macOS, Linux Source

Git

ActionDescriptionWindowsMacVerifiedSource
Source Control Show Git panel Ctrl+Shift+G Ctrl+Shift+G Windows, macOS, Linux Source

Navigation

ActionDescriptionWindowsMacVerifiedSource
Quick Open Open any file by name Ctrl+P Cmd+P Windows, macOS, Linux Source
Open Editors Quick switch between editors Ctrl+Tab Ctrl+Tab Windows, macOS, Linux Source
Focus Editor Group 1 Focus first editor group Ctrl+1 Cmd+1 Windows, macOS, Linux Source
Focus Editor Group 2 Focus second editor group Ctrl+2 Cmd+2 Windows, macOS, Linux Source
Focus Editor Group 3 Focus third editor group Ctrl+3 Cmd+3 Windows, macOS, Linux Source
Go to Line Jump to specific line number Ctrl+G Ctrl+G Windows, macOS, Linux Source
Go to Symbol Navigate to symbol in file Ctrl+Shift+O Cmd+Shift+O Windows, macOS, Linux Source
Go to Definition Jump to symbol definition F12 F12 Windows, macOS, Linux Source
Peek Definition Peek definition inline Alt+F12 Option+F12 Windows, macOS, Linux Source
Find All References Show all references Shift+F12 Shift+F12 Windows, macOS, Linux Source
Jump to Bracket Jump to matching bracket Ctrl+Shift+\ Cmd+Shift+\ Windows, macOS, Linux Source
Go to Beginning Go to beginning of file Ctrl+Home Cmd+Up Windows, macOS, Linux Source
Go to End Go to end of file Ctrl+End Cmd+Down Windows, macOS, Linux Source
Go Back Navigate editor history back Alt+Left Option+Left Windows, macOS, Linux Source
Go Forward Navigate editor history forward Alt+Right Option+Right Windows, macOS, Linux Source
Show Hover Show documentation hover at cursor Ctrl+K then Ctrl+I Cmd+K then Cmd+I Windows, macOS, Linux Source
Open Definition to Side Open symbol definition in side editor Ctrl+K then F12 Cmd+K then F12 Windows, macOS, Linux Source
Show All Symbols Search symbols across workspace Ctrl+T Cmd+T Windows, macOS, Linux Source
Focus Breadcrumbs Move focus to breadcrumb navigation bar Ctrl+Shift+; Cmd+Shift+; Windows, macOS, Linux Source
Focus and Select Breadcrumbs Focus breadcrumbs and open picker Ctrl+Shift+. Cmd+Shift+. Windows, macOS, Linux Source
Focus Left Editor Group Focus editor group to the left Ctrl+K then Ctrl+Left Cmd+K then Cmd+Left Windows, macOS, Linux Source
Focus Right Editor Group Focus editor group to the right Ctrl+K then Ctrl+Right Cmd+K then Cmd+Right Windows, macOS, Linux Source
Next Editor Open next editor tab Ctrl+PageDown Option+Cmd+Right Windows, macOS, Linux Source
Previous Editor Open previous editor tab Ctrl+PageUp Option+Cmd+Left Windows, macOS, Linux Source
Quick Open View Quick open any view or panel Ctrl+Q Ctrl+Q Windows, macOS, Linux Source
Go to Beginning of Line Move cursor to start of line Home Home Windows, macOS, Linux Source
Go to End of Line Move cursor to end of line End End Windows, macOS, Linux Source

Search

ActionDescriptionWindowsMacVerifiedSource
Search Show Search panel Ctrl+Shift+F Cmd+Shift+F Windows, macOS, Linux Source
Find Find in current file Ctrl+F Cmd+F Windows, macOS, Linux Source
Replace Find and replace in file Ctrl+H Option+Cmd+F Windows, macOS, Linux Source
Find in Selection Find within selection Alt+L Option+Cmd+L Windows, macOS, Linux Source
Find Next Go to next find match in file Enter Enter Windows, macOS, Linux Source
Find Previous Go to previous find match in file Shift+Enter Shift+Enter Windows, macOS, Linux Source
Select All Find Matches Select all matches of find query Alt+Enter Option+Enter Windows, macOS, Linux Source
Toggle Find Case Sensitive Toggle case sensitivity in find widget Alt+C Option+C Windows, macOS, Linux Source
Toggle Find Regex Toggle regex mode in find widget Alt+R Option+R Windows, macOS, Linux Source
Toggle Find Whole Word Toggle whole-word match in find widget Alt+W Option+W Windows, macOS, Linux Source
Replace in Files Find and replace across workspace Ctrl+Shift+H Cmd+Shift+H Windows, macOS, Linux Source
Toggle Search Details Show or hide search query details Ctrl+Shift+J Cmd+Shift+J Windows, macOS, Linux Source
Focus Next Search Result Focus next result in search panel F4 F4 Windows, macOS, Linux Source
Focus Previous Search Result Focus previous result in search panel Shift+F4 Shift+F4 Windows, macOS, Linux Source

Selection

ActionDescriptionWindowsMacVerifiedSource
Select Next Occurrence Select next matching word Ctrl+D Cmd+D Windows, macOS, Linux Source
Select All Occurrences Select all matching words Ctrl+Shift+L Cmd+Shift+L Windows, macOS, Linux Source
Add Selection to Next Add selection to next find match Ctrl+D Cmd+D Windows, macOS, Linux Source
Select All Select all in editor Ctrl+A Cmd+A Windows, macOS, Linux Source
Expand Selection Expand selection to next syntax node Shift+Alt+Right Shift+Option+Right Windows, macOS, Linux Source
Shrink Selection Shrink selection to parent syntax node Shift+Alt+Left Shift+Option+Left Windows, macOS, Linux Source
Select Current Line Select entire line at cursor Ctrl+L Cmd+L Windows, macOS, Linux Source
Add Cursor Above Add cursor on line above Ctrl+Alt+Up Cmd+Option+Up Windows, macOS, Linux Source
Add Cursor Below Add cursor on line below Ctrl+Alt+Down Cmd+Option+Down Windows, macOS, Linux Source
Add Cursors to Line Ends Add cursor at end of each selected line Shift+Alt+I Shift+Option+I Windows, macOS, Linux Source
Undo Last Cursor Operation Undo last multi-cursor change Ctrl+U Cmd+U Windows, macOS, Linux Source
Move Selection to Next Match Move last selection to next find match Ctrl+K then Ctrl+D Cmd+K then Cmd+D Windows, macOS, Linux Source
Select All Occurrences of Word Select all occurrences of current word Ctrl+F2 Cmd+F2 Windows, macOS, Linux Source

Terminal

ActionDescriptionWindowsMacVerifiedSource
Toggle Terminal Show or hide integrated terminal Ctrl+` Ctrl+` Windows, macOS, Linux Source
New Terminal Create new terminal Ctrl+Shift+` Ctrl+Shift+` Windows, macOS, Linux Source
Open External Terminal Open system command prompt Ctrl+Shift+C Cmd+Shift+C Windows, macOS, Linux Source
Split Terminal Split the active terminal pane Ctrl+Shift+5 Cmd+\ Windows, macOS, Linux Source

View

ActionDescriptionWindowsMacVerifiedSource
Toggle Sidebar Show or hide sidebar Ctrl+B Cmd+B Windows, macOS, Linux Source
Output Show Output panel Ctrl+Shift+U Cmd+Shift+U Windows, macOS, Linux Source
Zen Mode Enter Zen Mode Ctrl+K then Z Cmd+K then Z Windows, macOS, Linux Source
Scroll Line Up Scroll view up one line Ctrl+Up Ctrl+PageUp Windows, macOS, Linux Source
Scroll Line Down Scroll view down one line Ctrl+Down Ctrl+PageDown Windows, macOS, Linux Source
Fold Region Fold code region Ctrl+Shift+[ Option+Cmd+[ Windows, macOS, Linux Source
Unfold Region Unfold code region Ctrl+Shift+] Option+Cmd+] Windows, macOS, Linux Source
Fold All Fold all regions Ctrl+K then Ctrl+0 Cmd+K then Cmd+0 Windows, macOS, Linux Source
Unfold All Unfold all regions Ctrl+K then Ctrl+J Cmd+K then Cmd+J Windows, macOS, Linux Source
Split Editor Split editor right Ctrl+\ Cmd+\ Windows, macOS, Linux Source
Toggle Word Wrap Alt+Z Option+Z Windows, macOS, Linux Source
Toggle Panel Show or hide bottom panel Ctrl+J Cmd+J Windows, macOS, Linux Source
Toggle Minimap Show or hide minimap Ctrl+Shift+M Cmd+Shift+M Windows, Linux Source
Toggle Markdown Preview Toggle Markdown preview for current file Ctrl+Shift+V Cmd+Shift+V Windows, macOS, Linux Source
Open Preview to Side Open Markdown preview beside editor Ctrl+K then V Cmd+K then V Windows, macOS, Linux Source
Toggle Fold Toggle fold state of current region Ctrl+K then Ctrl+L Cmd+K then Cmd+L Windows, macOS, Linux Source
Fold Recursively Fold region and all nested subregions Ctrl+K then Ctrl+[ Cmd+K then Cmd+[ Windows, macOS, Linux Source
Unfold Recursively Unfold region and all nested subregions Ctrl+K then Ctrl+] Cmd+K then Cmd+] Windows, macOS, Linux Source
Move Editor Group Left Move active editor group left Ctrl+K then Left Cmd+K then Left Windows, macOS, Linux Source
Move Editor Group Right Move active editor group right Ctrl+K then Right Cmd+K then Right Windows, macOS, Linux Source
Move Editor to Next Group Move active editor to next group Ctrl+Alt+Right Cmd+Option+Right Windows, macOS, Linux Source
Move Editor to Previous Group Move active editor to previous group Ctrl+Alt+Left Cmd+Option+Left Windows, macOS, Linux Source
Toggle Full Screen Toggle full screen mode F11 Ctrl+Cmd+F Windows, macOS, Linux Source
Zoom In Increase workbench zoom level Ctrl+= Cmd+= Windows, macOS, Linux Source
Zoom Out Decrease workbench zoom level Ctrl+- Cmd+- Windows, macOS, Linux Source
Reset Zoom Reset workbench zoom to default Ctrl+Numpad0 Cmd+Numpad0 Windows, macOS, Linux Source
Leave Zen Mode Exit Zen Mode with double Escape Escape+Escape Escape+Escape Windows, macOS, Linux Source
Select Color Theme Open color theme picker Ctrl+K then Ctrl+T Cmd+K then Cmd+T Windows, macOS, Linux Source
Scroll Page Down Scroll editor down one page Alt+PageDown Option+PageDown Windows, macOS, Linux Source
Scroll Page Up Scroll editor up one page Alt+PageUp Option+PageUp Windows, macOS, Linux Source

Window

ActionDescriptionWindowsMacVerifiedSource
Close Editor Close active editor tab Ctrl+W Cmd+W Windows, macOS, Linux Source
Close Window Close VS Code window Ctrl+Shift+W Cmd+Shift+W Windows, macOS, Linux Source
Close All Editors Close all editor tabs Ctrl+K then Ctrl+W Cmd+K then Cmd+W Windows, macOS, Linux Source
Reopen Closed Editor Reopen the last closed editor tab Ctrl+Shift+T Cmd+Shift+T Windows, macOS, Linux Source
Keep Editor Open Pin editor tab to prevent auto-close Ctrl+K then Enter Cmd+K then Enter Windows, macOS, Linux Source
Close Editors in Group Close all editors in active group Ctrl+K then W Cmd+K then W Windows, macOS, Linux Source
New Window Open a new VS Code window Ctrl+Shift+N Cmd+Shift+N Windows, macOS, Linux Source
Move Editor Left Move tab left within editor group Ctrl+Shift+PageUp Cmd+Shift+PageUp Windows, Linux Source
Move Editor Right Move tab right within editor group Ctrl+Shift+PageDown Cmd+Shift+PageDown Windows, Linux Source

← All apps on Shortcut Atlas

Loading Shortcut Atlas…