# 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? 1. Select the code you want to change 2. Press Cmd + K on Mac or Ctrl + K on Windows/Linux 3. Type your instructions. For example: "Convert this to an async function." 4. Press Return. Cursor applies the edit to your selected code. 5. To refine, add follow-up instructions and press Return again. ## How do I ask a quick question with inline edit? 1. Select the code you want to ask about 2. Press Cmd + K on Mac or Ctrl + K on Windows/Linux 3. Switch to question mode: - **Mac**: Press Opt + Return - **Windows/Linux**: Press Alt + Return 4. Type your question. If you want to apply a suggested change, type "do it" and press Return. ## Can I switch from inline edit to Agent? For multi-file edits or more complex changes, select code and press Cmd + L on Mac (Ctrl + L on Windows/Linux). This opens Agent with your selected code as context. ## Related - [Agent mode](https://cursor.com/help/ai-features/agent.md) for multi-file editing --- ## Sitemap [Overview of all docs pages](/llms.txt)