VS Code & Cursor Shortcuts
Complete keyboard shortcuts reference for VS Code and Cursor IDE. Master productivity shortcuts including Cursor's powerful AI commands for faster development.
Cursor AI Commands
Cursor-specific AI-powered features for generating, editing, and understanding code.
Generate/Edit Code
Open inline AI editor to generate or modify code in place.
| Mac | Cmd + K |
| Windows/Linux | Ctrl + K |
Chat with AI
Open AI chat panel to ask questions about your code.
| Mac | Cmd + L |
| Windows/Linux | Ctrl + L |
New Chat
Start a fresh AI chat conversation.
| Mac | Cmd + Shift + L |
| Windows/Linux | Ctrl + Shift + L |
Inline AI
Trigger inline AI suggestions and completions.
| Mac | Cmd + I |
| Windows/Linux | Ctrl + I |
Accept AI Suggestion
Accept current AI code suggestion.
| All platforms | Tab |
Accept Next Word
Accept next word of AI suggestion.
| Mac | Cmd + → |
| Windows/Linux | Ctrl + → |
Essential Editing
Fundamental shortcuts for code editing and manipulation.
Cut, Copy, Paste Line
Cut, copy, or paste entire lines without selection.
| Mac | Cmd + X (Cut) Cmd + C (Copy) Cmd + V (Paste) |
| Windows/Linux | Ctrl + X (Cut) Ctrl + C (Copy) Ctrl + V (Paste) |
Tip: Without selection, cuts/copies entire line
Duplicate Line
Duplicate current line or selection above or below.
| Mac | Shift + Option + ↑ / ↓ |
| Windows/Linux | Shift + Alt + ↑ / ↓ |
Move Line Up/Down
Move current line or selection up or down.
| Mac | Option + ↑ / ↓ |
| Windows/Linux | Alt + ↑ / ↓ |
Delete Line
Delete entire line.
| Mac | Cmd + Shift + K |
| Windows/Linux | Ctrl + Shift + K |
Insert Line Below/Above
Insert new line below or above current line.
| Mac | Cmd + Enter (Below) Cmd + Shift + Enter (Above) |
| Windows/Linux | Ctrl + Enter (Below) Ctrl + Shift + Enter (Above) |
Comment/Uncomment Line
Toggle line comment.
| Mac | Cmd + / |
| Windows/Linux | Ctrl + / |
Block Comment
Toggle block comment.
| Mac | Shift + Option + A |
| Windows/Linux | Shift + Alt + A |
Indent/Outdent
Indent or outdent line/selection.
| Mac | Cmd + ] (Indent) Cmd + [ (Outdent) |
| Windows/Linux | Ctrl + ] (Indent) Ctrl + [ (Outdent) |
Format Document
Auto-format entire document.
| Mac | Shift + Option + F |
| Windows/Linux | Shift + Alt + F |
Format Selection
Format only selected code.
| Mac | Cmd + K then Cmd + F |
| Windows/Linux | Ctrl + K then Ctrl + F |
Multi-Cursor Editing
Edit multiple locations simultaneously for maximum productivity.
Add Cursor Above/Below
Add additional cursor on lines above or below.
| Mac | Cmd + Option + ↑ / ↓ |
| Windows/Linux | Ctrl + Alt + ↑ / ↓ |
Add Cursor at Click Position
Add cursor wherever you click.
| Mac | Option + Click |
| Windows/Linux | Alt + Click |
Select All Occurrences
Select all occurrences of current word/selection.
| Mac | Cmd + Shift + L |
| Windows/Linux | Ctrl + Shift + L |
Select Next Occurrence
Add next occurrence of selection to multi-cursor.
| Mac | Cmd + D |
| Windows/Linux | Ctrl + D |
Skip Next Occurrence
Skip current occurrence and move to next.
| Mac | Cmd + K then Cmd + D |
| Windows/Linux | Ctrl + K then Ctrl + D |
Column (Box) Selection
Select rectangular region of text.
| Mac | Shift + Option + Drag |
| Windows/Linux | Shift + Alt + Drag |
Search & Replace
Powerful search and replace functionality across files.
Find in File
Search within current file.
| Mac | Cmd + F |
| Windows/Linux | Ctrl + F |
Find & Replace in File
Search and replace within current file.
| Mac | Option + Cmd + F |
| Windows/Linux | Ctrl + H |
Find in Files
Search across all files in workspace.
| Mac | Cmd + Shift + F |
| Windows/Linux | Ctrl + Shift + F |
Replace in Files
Replace across all files in workspace.
| Mac | Cmd + Shift + H |
| Windows/Linux | Ctrl + Shift + H |
Find Next/Previous
Navigate through search results.
| Mac | Cmd + G (Next) Cmd + Shift + G (Previous) |
| Windows/Linux | F3 (Next) Shift + F3 (Previous) |
Select All Find Matches
Select all occurrences of current search.
| Mac | Option + Enter |
| Windows/Linux | Alt + Enter |
Command Palette
Access all commands and features through the command palette.
Show Command Palette
Open command palette to access all commands.
| Mac | Cmd + Shift + P |
| Windows/Linux | Ctrl + Shift + P |
Settings
Open settings UI or JSON.
| Mac | Cmd + , |
| Windows/Linux | Ctrl + , |
Keyboard Shortcuts
Open keyboard shortcuts editor.
| Mac | Cmd + K then Cmd + S |
| Windows/Linux | Ctrl + K then Ctrl + S |
Terminal
Integrated terminal shortcuts for command-line work.
Toggle Terminal
Show/hide integrated terminal.
| All platforms | Ctrl + ` |
Create New Terminal
Open new terminal instance.
| All platforms | Ctrl + Shift + ` |
Focus Terminal
Move focus to terminal pane.
| Mac | Cmd + J |
| Windows/Linux | Ctrl + J |
Kill Terminal
Close active terminal instance.
| Mac | Cmd + W (in terminal) |
| Windows/Linux | Ctrl + W (in terminal) |
Split Terminal
Split terminal pane.
| Mac | Cmd + \ (in terminal) |
| Windows/Linux | Ctrl + Shift + 5 |
Display & Layout
Manage editor layout and visibility.
Toggle Sidebar
Show/hide sidebar (file explorer).
| Mac | Cmd + B |
| Windows/Linux | Ctrl + B |
Toggle Panel
Show/hide bottom panel (terminal, problems, output).
| Mac | Cmd + J |
| Windows/Linux | Ctrl + J |
Zen Mode
Enter distraction-free full-screen mode.
| Mac | Cmd + K then Z |
| Windows/Linux | Ctrl + K then Z |
Split Editor
Split editor vertically.
| Mac | Cmd + \ |
| Windows/Linux | Ctrl + \ |
Focus Editor Group
Switch focus between split editors.
| Mac | Cmd + 1 / 2 / 3 |
| Windows/Linux | Ctrl + 1 / 2 / 3 |
Zoom In/Out
Increase/decrease editor zoom level.
| Mac | Cmd + = (In) Cmd + - (Out) |
| Windows/Linux | Ctrl + = (In) Ctrl + - (Out) |
File Management
Manage files and editor tabs efficiently.
New File
Create new untitled file.
| Mac | Cmd + N |
| Windows/Linux | Ctrl + N |
Open File
Open file dialog.
| Mac | Cmd + O |
| Windows/Linux | Ctrl + O |
Save File
Save current file.
| Mac | Cmd + S |
| Windows/Linux | Ctrl + S |
Save As
Save file with new name/location.
| Mac | Cmd + Shift + S |
| Windows/Linux | Ctrl + Shift + S |
Save All
Save all open files.
| Mac | Option + Cmd + S |
| Windows/Linux | Ctrl + K then S |
Close Editor
Close current editor tab.
| Mac | Cmd + W |
| Windows/Linux | Ctrl + W |
Close All Editors
Close all open editor tabs.
| Mac | Cmd + K then W |
| Windows/Linux | Ctrl + K then W |
Reopen Closed Editor
Reopen last closed editor tab.
| Mac | Cmd + Shift + T |
| Windows/Linux | Ctrl + Shift + T |
Copy Path
Copy file path to clipboard.
| Mac | Cmd + K then P |
| Windows/Linux | Ctrl + K then P |
Reveal in File Explorer
Show file in sidebar.
| Mac | Cmd + K then R |
| Windows/Linux | Ctrl + K then R |
Refactoring
Code refactoring and symbol manipulation.
Rename Symbol
Rename symbol across all references.
| All platforms | F2 |
Quick Fix
Show available quick fixes and refactorings.
| Mac | Cmd + . |
| Windows/Linux | Ctrl + . |
Show Hover
Show hover information (type info, docs).
| Mac | Cmd + K then Cmd + I |
| Windows/Linux | Ctrl + K then Ctrl + I |
Trigger Suggest
Manually trigger IntelliSense suggestions.
| All platforms | Ctrl + Space |
Trigger Parameter Hints
Show function parameter hints.
| Mac | Cmd + Shift + Space |
| Windows/Linux | Ctrl + Shift + Space |
Debugging
Debug your code with breakpoints and step-through execution.
Toggle Breakpoint
Add/remove breakpoint on current line.
| All platforms | F9 |
Start/Continue Debugging
Start debugging or continue to next breakpoint.
| All platforms | F5 |
Step Over
Execute current line and move to next.
| All platforms | F10 |
Step Into
Step into function calls.
| All platforms | F11 |
Step Out
Step out of current function.
| All platforms | Shift + F11 |
Stop Debugging
Stop debug session.
| All platforms | Shift + F5 |
Show Problems
Open problems panel (errors, warnings).
| Mac | Cmd + Shift + M |
| Windows/Linux | Ctrl + Shift + M |
Emmet Abbreviations
Rapid HTML/CSS generation with Emmet shortcuts.
Expand Abbreviation
Expand Emmet abbreviation into full code.
| All platforms | Tab |
<!-- Before: ul>li*5 -->
<!-- After Tab: -->
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
Common Emmet Patterns
// Child: >
div>ul>li
// Sibling: +
div+p+span
// Climb up: ^
div>ul>li^div
// Multiply: *
ul>li*3
// Grouping: ()
div>(header>ul>li*2)+footer>p
// ID and Class
div#header.container.main
// Attributes
a[href="#" title="Link"]
// Text: {}
li{Item $}*3
// CSS Properties
m10 → margin: 10px;
p20-30 → padding: 20px 30px;
w100p → width: 100%;
Pro Tips
- Customize shortcuts: Open Settings → Keyboard Shortcuts → Search for any command
- Format on Save: Enable in Settings → "Format on Save"
- Auto Save: Settings → Files: Auto Save → "afterDelay"
- Workspace settings: Create
.vscode/settings.jsonin project root - Custom snippets: Cmd/Ctrl + Shift + P → "Configure User Snippets"
- Cursor AI Tips: Use Cmd+K with selected code for targeted edits; Reference specific files with @filename in chat