starmorph logo
Published on

Cursor and VSCode Mac Keyboard Shortcuts Guide for Developers

Cursor and VSCode Mac Keyboard Shortcuts Guide for Developers

Mastering keyboard shortcuts is one of the fastest ways to increase your coding speed and efficiency. This comprehensive reference guide covers all essential shortcuts for Mac users in both Cursor IDE and VSCode. While Cursor is built on VSCode and shares many shortcuts, it has unique AI-powered features with their own key combinations. Whether you're writing code, refactoring, or navigating through files, these shortcuts will significantly boost your development workflow.

Why Learn Cursor and VSCode Shortcuts?

Professional developers can save up to 8 hours per week by efficiently using keyboard shortcuts. For Mac users, these shortcuts are particularly important as they're optimized for the macOS environment and follow Apple's keyboard conventions. Understanding the differences between Cursor IDE and VSCode shortcuts will help you seamlessly transition between both environments.

Multi-Cursor Editing

CommandVSCode ShortcutCursor Shortcut
Add cursor at mouse positionOption+ClickOption+Click
Add cursors above/belowOption+Cmd+Up/DownOption+Cmd+Up/Down
Select next occurrenceCmd+DCmd+D
Select all occurrencesCmd+Shift+LCmd+Shift+L
Insert cursor at end of lineOption+Cmd+LShift+Option+I

Line Manipulation

CommandVSCode ShortcutCursor Shortcut
Duplicate lineShift+Option+DownShift+Option+Down
Move line up/downOption+Up/DownOption+Up/Down
Delete lineCmd+Shift+KCmd+Shift+K
Insert line belowCmd+EnterCmd+Enter
Insert line aboveCmd+Shift+EnterCmd+Shift+Enter
Join linesCtrl+JCtrl+J

Code Folding

CommandVSCode ShortcutCursor Shortcut
Fold current blockOption+Cmd+[Option+Cmd+[
Unfold current blockOption+Cmd+]Option+Cmd+]
Fold allCmd+K Cmd+0Cmd+K Cmd+0
Unfold allCmd+K Cmd+JCmd+K Cmd+J
Fold level 1-5Cmd+K Cmd+1 through Cmd+K Cmd+5Cmd+K Cmd+1 through Cmd+K Cmd+5

Terminal Controls

CommandVSCode ShortcutCursor Shortcut
Toggle terminalCmd+`Cmd+`
Navigate between terminalsCmd+Shift+[/]Cmd+Shift+[/]
Create new terminalCtrl+Shift+ ``Ctrl+Shift+ ``
Kill active terminalCmd+Shift+P then "Terminal: Kill"Cmd+Shift+P then "Terminal: Kill"
Clear terminalCmd+K (when terminal is focused)Cmd+K (when terminal is focused)

Quick Fixes and Refactoring

CommandVSCode ShortcutCursor Shortcut
Show quick fixesCmd+.Cmd+.
Organize importsShift+Option+OShift+Option+O
Rename symbolF2F2
Format documentShift+Option+FShift+Option+F
Format selectionCmd+K Cmd+FCmd+K Cmd+F
Extract method/variableCmd+Shift+P then "Refactor"Cmd+Shift+P then "Refactor"
Smart format with AIN/ACmd+Shift+I

Managing Editor Splits

CommandVSCode ShortcutCursor Shortcut
Split editorCmd+\Cmd+\
Close current editorCmd+WCmd+W
Close all editorsCmd+K Cmd+WCmd+K Cmd+W
Navigate between splitsCmd+1, Cmd+2, etc.Cmd+1, Cmd+2, etc.
Move editor to next groupCmd+Ctrl+RightCmd+Ctrl+Right
Move editor to previous groupCmd+Ctrl+LeftCmd+Ctrl+Left

Bracket and Selection

CommandVSCode ShortcutCursor Shortcut
Jump to matching bracketCmd+Shift+\Cmd+Shift+\
Select current lineCmd+LCmd+I (AI chat in Cursor)
Expand selectionCtrl+Shift+Cmd+RightCtrl+Shift+Cmd+Right
Shrink selectionCtrl+Shift+Cmd+LeftCtrl+Shift+Cmd+Left
Select all matchesCmd+Shift+LCmd+Shift+L
Select between bracketsCmd+Shift+MCmd+Shift+M
CommandVSCode ShortcutCursor Shortcut
Go backCtrl+-Ctrl+-
Go forwardCtrl+Shift+-Ctrl+Shift+-
Go to definitionF12 or Cmd+ClickF12 or Cmd+Click
Go to lineCtrl+GCtrl+G
Go to symbol in fileCmd+Shift+OCmd+Shift+O
Go to symbol in workspaceCmd+TCmd+T

Zen Mode and Focus

CommandVSCode ShortcutCursor Shortcut
Toggle Zen modeCmd+K ZCmd+K Z
Toggle sidebarCmd+BCmd+B
Toggle full screenCtrl+Cmd+FCtrl+Cmd+F
Toggle panelCmd+JCmd+J
Focus on editorCmd+1Cmd+1
Focus on terminalCtrl+ ``Ctrl+ ``

Search and Replace

CommandVSCode ShortcutCursor Shortcut
FindCmd+FCmd+F
ReplaceCmd+Option+FCmd+Option+F
Find in filesCmd+Shift+FCmd+Shift+F
Replace in filesCmd+Shift+HCmd+Shift+H
Find nextCmd+GCmd+G
Find previousCmd+Shift+GCmd+Shift+G

File Management

CommandVSCode ShortcutCursor Shortcut
New fileCmd+NCmd+N
Open fileCmd+OCmd+O
Save fileCmd+SCmd+S
Save file asCmd+Shift+SCmd+Shift+S
Close fileCmd+WCmd+W
Reopen closed editorCmd+Shift+TCmd+Shift+T

Git Integration

CommandVSCode ShortcutCursor Shortcut
Show source controlCtrl+Shift+GCtrl+Shift+G
Stage changesCmd+Shift+P then "Git: Stage"Cmd+Shift+P then "Git: Stage"
Commit stagedCmd+Shift+P then "Git: Commit"Cmd+Shift+P then "Git: Commit"
PushCmd+Shift+P then "Git: Push"Cmd+Shift+P then "Git: Push"
PullCmd+Shift+P then "Git: Pull"Cmd+Shift+P then "Git: Pull"

Cursor IDE AI-Specific Shortcuts

These shortcuts are unique to Cursor IDE and leverage its AI capabilities:

CommandCursor Shortcut
Generate code with AICmd+K Cmd+G
Explain code selectionCmd+K Cmd+E
AI chat in editorCmd+I
Smart format document with AICmd+Shift+I
Edit code with AICmd+K Cmd+M
Generate code in contextCmd+K Cmd+A
Send code to AI chatCmd+K Cmd+S
View AI command paletteCmd+K Cmd+P

Productivity Tips for Mac Developers

  1. Customize Your Shortcuts: Use the Keyboard Shortcuts editor (Cmd+K Cmd+S) in both Cursor and VSCode to personalize shortcuts based on your workflow.

  2. Learn Incrementally: Master 2-3 new shortcuts each week rather than trying to memorize all at once.

  3. Use Cheat Sheets: Keep a printed shortcuts reference near your workspace until they become muscle memory.

  4. Watch Your Hands: Reduce the need to switch between keyboard and mouse/trackpad by using navigation shortcuts.

  5. Install Keybinding Extensions: Consider extensions that bring keybindings from other editors you're familiar with (e.g., Vim, Sublime, IntelliJ).

  6. Leverage Cursor's AI Features: Take advantage of Cursor's AI-powered shortcuts to speed up code generation, debugging, and refactoring.

Visualizing Keyboard Shortcuts

Understanding keyboard shortcuts visually can help with memorization. Consider using a keyboard visualizer to practice these combinations.

Conclusion

Investing time to learn these Cursor and VSCode shortcuts for Mac will dramatically increase your development speed and reduce the cognitive load of context-switching. The efficiency gains compound over time, making you a more productive developer while reducing strain from repetitive mouse movements.

Remember that muscle memory takes time to build. Be patient with yourself and focus on the shortcuts most relevant to your daily coding tasks first. Cursor's AI-enhanced features also provide powerful productivity boosts when used with their dedicated shortcuts.

Happy coding!