Feature request for product/service
Cursor IDE
Describe the request
Feature Request: Dedicated “Explain Code” Command
Summary
Please add a dedicated cursorai.action.explainCode command that can be bound to a custom keyboard shortcut, similar to how JetBrains AI Assistant and GitHub Copilot implement this feature.
Current Situation
Currently, to explain selected code in Cursor, users must:
- Select code
- Press
Cmd+Lto open AI Chat - Manually type “Explain this code”
- Press Enter
This is a 4-step process for one of the most common AI-assisted coding tasks.
How Competitors Handle This
JetBrains AI Assistant
- Right-click → “Explain with AI” (context menu)
- Dedicated action: Available in Find Action (
Cmd+Shift+A) - One-click solution
GitHub Copilot (VSCode)
- Right-click → “Copilot” → “Explain This” (context menu)
- Command ID:
github.copilot.interactiveEditor.explain - Can be bound to any keyboard shortcut
VSCode Built-in (with Copilot Chat)
- Select code →
/explaincommand in chat - Slash commands provide quick access
Proposed Solution
Add a dedicated command:
{
"command": "cursorai.action.explainCode",
"title": "Cursor: Explain Selected Code"
}
Expected Behavior
- User selects code
- User triggers command (via shortcut or context menu)
- AI Chat opens automatically with “Explain this code” pre-filled
- Explanation begins immediately
Bonus: Context Menu Integration
Add “Explain with AI” to the editor context menu (right-click):
─────────────────────────
Edit with AI (Cmd+K)
Explain with AI ← NEW
Chat about Code (Cmd+L)
─────────────────────────
Why This Matters
| Current Workflow | Proposed Workflow |
|---|---|
| Select → Cmd+L → Type “explain” → Enter | Select → Cmd+Shift+E |
| 4 steps, ~5 seconds | 1 step, instant |
| Requires typing | No typing needed |
| Can’t customize shortcut | Fully customizable |
Use Cases
- Code review: Quickly understand unfamiliar code
- Learning: New developers exploring a codebase
- Debugging: Understanding complex logic before fixing
- Onboarding: Getting up to speed on legacy code
Additional Context
I’ve looked through keybindings.json and the command palette, but couldn’t find any existing command for this. The closest commands are:
aichat.newchataction- Opens chat (but doesn’t pre-fill prompt)aipopup.action.modal.generate- Opens inline edit (not for explanations)
Currently, I’m using a Keyboard Maestro macro as a workaround, but this:
- Only works on macOS
- Requires external software
- Feels like a hack for basic functionality
Summary
Cursor is marketed as an “AI-first code editor,” yet it lacks a one-click “Explain Code” command that both JetBrains and GitHub Copilot have had for years. This seems like low-hanging fruit that would significantly improve the user experience.
Requested commands:
cursorai.action.explainCode- Explain selected codecursorai.action.documentCode- Generate documentation (bonus)cursorai.action.refactorCode- Suggest refactoring (bonus)
Thank you for considering this feature! ![]()
Environment:
- Cursor Version: Latest
- OS: macOS
- Related: Keyboard shortcuts, AI Chat, Context menu
Screenshot / Screen Recording
Operating System (if it applies)
Windows 10/11
MacOS
Linux
