Visual Studio Code Documentation

Keyboard Shortcuts Reference

General

Essential shortcuts for interacting with VS Code.

Command Windows/Linux macOS
Show All Commands Ctrl+Shift+P Cmd+Shift+P
Show Explorer Ctrl+Shift+E Cmd+Shift+E
Show Search Ctrl+Shift+F Cmd+Shift+F
Show Git Ctrl+Shift+G Cmd+Shift+G
Show Debug Ctrl+Shift+D Cmd+Shift+D
Show Terminal Ctrl+` Ctrl+`
New Window Ctrl+Shift+N Cmd+Shift+N
Close Window Ctrl+Shift+W Cmd+Shift+W

Editing

Shortcuts for efficient code editing.

Command Windows/Linux macOS
Cut Line Up Ctrl+X (with empty selection) Cmd+X (with empty selection)
Copy Line Up Ctrl+C (with empty selection) Cmd+C (with empty selection)
Move Line Up Alt+Up Arrow Option+Up Arrow
Move Line Down Alt+Down Arrow Option+Down Arrow
Duplicate Line Shift+Alt+Up Arrow Shift+Option+Up Arrow
Insert Line Above Ctrl+Enter Cmd+Enter
Insert Line Below Ctrl+Shift+Enter Cmd+Shift+Enter
Delete Line Shift+Delete Shift+Delete
Toggle Line Comment Ctrl+/ Cmd+/
Toggle Block Comment Shift+Alt+A Shift+Option+A
Format Document Shift+Alt+F Shift+Option+F
Format Selection Ctrl+K Ctrl+F Cmd+K Cmd+F

IntelliSense

Code completion and suggestions.

Command Windows/Linux macOS
Trigger Suggestion Ctrl+Space Ctrl+Space
Parameter Hints Ctrl+Shift+Space Cmd+Shift+Space
Quick Open Definition Ctrl+F12 Cmd+F12
Show Hover Ctrl+K Ctrl+I Cmd+K Cmd+I

Terminal

Interact with your shell directly.

Command Windows/Linux macOS
Toggle Terminal Panel Ctrl+` Ctrl+`
Create New Terminal Ctrl+Shift+` Cmd+Shift+`
Split Terminal Ctrl+\\ Cmd+\\
Move Focus to Next Terminal Ctrl+PageDown Ctrl+PageDown
Move Focus to Previous Terminal Ctrl+PageUp Ctrl+PageUp

Debugging

Control your debugging sessions.

Command Windows/Linux macOS
Start/Continue Debugging F5 F5
Stop Debugging Shift+F5 Shift+F5
Step Over F10 F10
Step Into F11 F11
Step Out Shift+F11 Shift+F11
Toggle Breakpoint F9 F9

Source Control

Manage your code with Git.

Command Windows/Linux macOS
Open Source Control View Ctrl+Shift+G Cmd+Shift+G
Stage All Changes Ctrl+Alt+S Cmd+Alt+S
Commit All Ctrl+Enter Cmd+Enter
Push Ctrl+Shift+P Cmd+Shift+P (and type "Push")
Pull Ctrl+Shift+P Cmd+Shift+P (and type "Pull")