Skip to lesson
Exit
Inline edit with Cmd/Ctrl+K1 / 2

2 min lesson

Practice Inline Edit

Practice Inline Edit on one real case. Check the result before moving on.

Step 1 of 2

Select only the body of one small helper, ask for the exact rewrite and keep the function name, return type and callers outside the change. Read the proposed patch, run the local test and confirm that the diff stays inside the selection.

Cmd+K on a helper — rename the variable, not the contract

0:38 · narrated
Read this demo as text
  1. The fix lives inside filterResults — three lines, one local variable. Select just the body, then Cmd+K instead of Agent.
  2. One instruction, one variable, one file. The diff comes back inside the exact selection — read every renamed line before you touch Accept.
  3. Accepted. filterResults still takes the same arguments and returns the same shape. Source Control shows exactly one changed file — the boundary held.
Select the function body and use for a precise rewrite. Read every changed line before accepting it.

Practice next: Now select a small region, name the exact rewrite and check that the diff stays inside your selection.

Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.