Skip to content

Inline edit: the bounded local change

Between “type it myself with Tab’s help” and “hand it to the Agent” sits the gesture you’ll use more than either: inline edit, opened with Cmd+K on macOS or Ctrl+K on Windows and Linux.

Inline edit is the everyday non-agentic edit gesture. You select the code you want to change (or just place your cursor), press the chord, and a small prompt box opens right there in the file. You type what you want changed - “extract this into a helper”, “add an error return here”, “make this case-insensitive” - and Cursor rewrites the selection in place, showing the result as a diff you accept or reject before it lands.

The reason it’s a distinct gesture and not just “the Agent, smaller” is scope. Inline edit is scoped to what you selected. It isn’t going to wander into four other files, run your tests, and come back with a five-file diff. It does the bounded, local, single-spot change - the kind where you know exactly which lines should change and roughly how, you just don’t want to type the new version by hand. That makes it predictable in a way the Agent deliberately isn’t: you always know the blast radius, because you drew it yourself with the selection.

# Cursor's CSV importer assumes MM/DD. You've selected the parse line
# and pressed Cmd/Ctrl+K:
┌─ edit selection ─────────────────────────────────┐
│ parse this as DD/MM, not MM/DD │
└──────────────────────────────────────────────────┘
- t, _ := time.Parse("01/02/2006", raw)
+ t, _ := time.Parse("02/01/2006", raw)
[✓ keep] [✗ undo]

So you now have three rungs, smallest to largest, and the skill is reaching for the smallest one that fits:

  • Tab - you’re already typing the change; let it finish your keystrokes.
  • Cmd/Ctrl+K inline edit - you know which lines change and roughly how, but don’t want to type the new version. Bounded to your selection.
  • Agent sidebar - you can describe the outcome but not the edit; you want it to find the files, make the changes, and run the checks.

Picking the smallest rung that fits is most of what “fast in Cursor” means. The instinct that takes longest to build is down-shifting - catching yourself about to summon the Agent for something inline edit would do in one bounded pass.

The top rung of that ladder is the Agent sidebar, and everything you type into it runs on a two-character grammar worth getting straight before you go further. Next: what @ and / each do.