Cursor

How to Use Cursor: A 10-Minute First-Edit Tutorial

3 min read

Cursor is VS Code with three AI entry points: Tab for completions, Cmd/Ctrl K for an edit on the lines you selected, and the Agent sidepane on Cmd/Ctrl I. Ten minutes is enough to land one real change with all three.

1. Open your project folder

File → Open Folder and pick the repository root, not a single file: Agent searches and edits inside the folder you opened.

2. Learn the four keys

ActionmacOSWindows and Linux
Accept a Tab suggestionTabTab
Accept only the next wordCmd →Ctrl →
Inline edit on the selectionCmd KCtrl K
Toggle the Agent sidepaneCmd I or Cmd LCtrl I or Ctrl L
Add the selection to chatCmd Shift LCtrl Shift L

Cursor’s shortcuts reference lists the macOS bindings; Windows and Linux swap Cmd for Ctrl.

3. Make one inline edit

Select the lines, press Cmd/Ctrl K, describe the change:

add a guard clause that returns early when userId is missing

What it does: scopes the request to the selected lines rather than the whole file, so the result is small enough to read.

4. Give Agent a job that spans files

@auth.ts add rate limiting to the login route, with a test beside the existing ones

What it does: @-mentions pull the named files into context. Agent can search the codebase, read and edit files, and run terminal commands — real tool use — and it applies edits automatically, so review happens after the write, not before it.

5. Verify it worked

git diff --stat

What it does: lists every file Agent touched and by how much — the fastest check that it stayed inside what you asked for. Run the tests next.

Cursor also takes checkpoints: snapshots made automatically before significant changes in a session. Click one in the chat timeline to preview it, or restore it to put every file back to that state — local, and separate from Git.

Failure mode: an edit you did not want, already on disk

Because Agent writes as it goes, a vague instruction lands before you see it. Restore the checkpoint from just before the run, then ask again scoped to one file and one function — a session safety net, not a substitute for committing first.

Standing rules — framework, test style, paths to leave alone — belong in a rules file rather than in every prompt, and the outside tools Agent reaches are worth pinning down too: see MCP servers in Cursor.

Open the full interactive version (with copy buttons) ↗

← All guides