Essential Keyboard Shortcuts in Cursor Editor
2024-03-20By Cursor Team
Introduction
Mastering keyboard shortcuts is essential for maximizing your productivity in Cursor Editor. This guide covers the most important shortcuts you need to know, organized by category.
Note: On macOS, replace Ctrl
with Cmd
for most shortcuts.
AI Feature Shortcuts
Cursor's AI features are at your fingertips with these shortcuts:
Chat Interface
Ctrl+K
- Open chat windowCtrl+L
- Focus chat inputEsc
- Close chat window
Code Operations
Ctrl+Shift+I
- Explain codeAlt+/
- AI code completionCtrl+Shift+R
- Refactor code
Editing Shortcuts
Essential shortcuts for code editing:
Basic Editing
Ctrl+X
- Cut lineCtrl+C
- Copy lineCtrl+V
- PasteCtrl+/
- Toggle comment
Advanced Editing
Alt+↑/↓
- Move line up/downCtrl+Shift+K
- Delete lineCtrl+Enter
- Insert line belowCtrl+Shift+Enter
- Insert line above
Selection Shortcuts
Efficiently select and manipulate code:
Basic Selection
Ctrl+L
- Select current lineCtrl+D
- Select next occurrenceCtrl+U
- Undo last selection
Advanced Selection
Alt+Click
- Add cursorCtrl+Alt+↑/↓
- Add cursor above/belowCtrl+Shift+L
- Select all occurrences
Search Shortcuts
Find what you need quickly:
File Search
Ctrl+F
- Find in fileCtrl+H
- Replace in fileF3
- Find next
Global Search
Ctrl+Shift+F
- Find in workspaceCtrl+Shift+H
- Replace in workspaceCtrl+T
- Search symbols
Terminal Shortcuts
Control the integrated terminal:
Terminal Control
Ctrl+`
- Toggle terminalCtrl+Shift+`
- New terminalCtrl+Shift+5
- Split terminal
Terminal Navigation
Alt+←/→
- Switch terminal tabsCtrl+PageUp/Down
- Scroll terminalCtrl+Home/End
- Scroll to top/bottom
Customizing Shortcuts
Make Cursor work your way:
- Open Command Palette (
Ctrl+Shift+P
) - Type "Keyboard Shortcuts"
- Find the command you want to customize
- Click the edit icon
- Press your desired key combination
Tip: You can also edit the keybindings.json
file directly for more advanced customization.