Basics

Inline edit

The Cmd-K edit loop — the move you'll use most.

Cursor inline edit

The move you'll use most

Inline edit — the Cmd-K loop — is the heart of everyday Cursor use. Select some code, describe the change in plain language, and Cursor rewrites it in place with full awareness of the surrounding file. It is faster than switching to a chat window, and because it edits where you are looking, you stay in flow. Most of the value people get from Cursor day to day comes from this one loop, not the headline agent features. Master it and the editor starts to feel like a genuine extension of your hands.

Scope the selection, describe the intent

Inline edit works best when you select exactly the code you want changed and describe the intent, not the keystrokes: 'add error handling for the network call', 'convert this to async', 'extract these into a helper'. A tight selection keeps the change contained and easy to review; a clear intent lets Cursor use the surrounding context to do it correctly. Accept when it is right, refine when it is close, and you build a fast, controlled editing rhythm.

Frequently asked
What is inline edit in Cursor?

The Cmd-K loop: select code, describe a change in plain language, and Cursor rewrites it in place with awareness of the surrounding file. It is the most-used everyday move in Cursor.

How do I get the best results from inline edit?

Select exactly the code to change and describe the intent — 'add error handling', 'convert to async' — rather than the exact edit. A tight selection keeps changes contained and reviewable.

Is inline edit better than the chat for small changes?

Usually yes. Inline edit keeps you in the file and in flow, whereas switching to chat breaks that rhythm. For quick, local changes it is the faster tool.