Inline edit
Inline edit lets you make quick, targeted code changes without opening the chat panel. Select code, describe what you want, and Cursor applies the edit in place.
How do I use inline edit?
- Select the code you want to change
- Press CmdCtrl + K on Mac or Ctrl + K on Windows/Linux
- Type your instructions. For example: "Convert this to an async function."
- Press ReturnEnter. Cursor applies the edit to your selected code.
- To refine, add follow-up instructions and press ReturnEnter again.
How do I ask a quick question with inline edit?
- Select the code you want to ask about
- Press CmdCtrl + K on Mac or Ctrl + K on Windows/Linux
- Switch to question mode: Mac: Press OptAlt + ReturnEnter Windows/Linux: Press Alt + ReturnEnter
- Type your question. If you want to apply a suggested change, type "do it" and press ReturnEnter.
Can I switch from inline edit to Agent?
For multi-file edits or more complex changes, select code and press CmdCtrl + L on Mac (Ctrl + L on Windows/Linux). This opens Agent with your selected code as context.