The Inline Edit panel (Ctrl+K) is the fastest way to make targeted code changes. Select code, press Ctrl+K, describe what you want, and the AI modifies it in-place with a clear diff view.
Ctrl+K to open the inline promptCtrl+Enter to accept, Ctrl+Backspace to rejectIf you press Ctrl+K without selecting any code, Cursor generates new code at the cursor position. This is perfect for quickly scaffolding functions, adding imports, or inserting boilerplate.
| Tool | Scope | Best For |
|---|---|---|
| Ask mode (Ctrl+L) | Read-only Q&A, explanations | Understanding code, debugging |
| Inline (Ctrl+K) | Single-file edits — editor & terminal | Quick targeted modifications |
| Agent (Ctrl+I) | Multi-file edits & autonomous tasks | Features, refactoring, agent workflows |