Cursor is not “VS Code with a ChatGPT sidebar.” It is a VS Code fork that wires AI directly into file operations, the terminal, and your codebase index. The win is the loop: describe a change, let the model edit real files, read the diff, accept or reject. This guide gets you from a cold install to a reviewed first edit in about 30 minutes, with every shortcut and the two mistakes that waste a beginner’s first hour.
TL;DR
- Three entry points: Inline edit (Cmd+K) for one block, Composer (Cmd+I) for multi-file work, Ask/Chat (Cmd+L) for read-only questions.
- Inside Composer, cycle Agent / Ask / Plan with Shift+Tab. Agent can edit files and run terminal commands; Ask only answers; Plan drafts a step list first.
- Indexing finishing is not the same as the model using that context. Inject it explicitly with
@(a file) or@Codebase(semantic repo search). - Always read the diff before
Apply. Work on a git branch so a bad accept is onegit restoreaway. - As of June 2026, Cursor runs Claude Sonnet 4.6 (the price/performance default), Opus 4.7, GPT-5.5, Gemini 3.1 Pro, and Cursor’s own Composer 2.5 for fast multi-file edits.
Install and first open
- Download from cursor.com (it is a VS Code fork, so your existing VS Code extensions and keybindings import on first launch).
- Sign in. On the Hobby (free) plan you get roughly 2,000 completions and a small pool of slow agent requests per month; Pro is $20/month (about $16 billed annually) with a ~$20 monthly model-credit pool.
- Pick a default model. Claude Sonnet 4.6 is the best daily price/performance pick. Save Opus 4.7 or GPT-5.5 for hard refactors and reach for Composer 2.5 when you want speed on routine multi-file edits.
- Open an existing project directory (
File > Open Folder). Do not start in an empty folder — the whole point is letting Cursor see real code.
The three core actions
Inline edit — Cmd+K
Put your cursor in a function or select a block, press Cmd+K (Mac) / Ctrl+K (Windows/Linux), and type the instruction: “add JSDoc,” “convert this to TypeScript,” “extract a helper.” Only the selected block changes, and you see a side-by-side diff before accepting. This is the cheapest, most predictable action — use it for surgical, single-file edits.
Composer — Cmd+I
Cmd+I opens Composer, the multi-file surface. Inside it, Shift+Tab cycles three modes:
| Mode | What it does | Use it for |
|---|---|---|
| Agent | Reads files, edits across the repo, runs terminal commands, fixes its own errors | ”Create routes/user.ts mirroring routes/auth.ts,” scaffolding, test generation |
| Ask | Answers questions, proposes changes, but will not touch files | Understanding a flow before you let it edit |
| Plan | Drafts a numbered step list you approve before any edit | Bigger changes where you want a checkpoint before code moves |
Agent mode is the autonomous loop most people mean when they say “Cursor wrote it.” It will pick files itself, but you still get a per-file diff to accept or reject.
Ask / Chat — Cmd+L
Cmd+L opens a read-only conversation in the sidebar. Use it to explain unfamiliar code, debate two approaches, or sanity-check a plan. Nothing it says changes a file until you move to Inline or Composer.
Make the AI actually see your project
This is the step beginners skip, and it is the difference between “Cursor is magic” and “Cursor keeps inventing functions that don’t exist.”
Cursor builds a semantic index of your repo in the background. You can watch progress under Cursor Settings → Features → Codebase Indexing, which also shows the indexed file count. But the index finishing does not mean a given answer used it. You inject context explicitly:
- Type
@and pick a specific file or folder when you already know where the relevant code lives. - Type
@Codebaseto run a semantic search across the whole repo when you do not. A good pattern:@Codebaseto discover, then switch to a precise@once you know the file.
Before you index anything large, add a .cursorignore file (same syntax as .gitignore) excluding node_modules/, dist/, build/, .next/, and big data files. Without it, Cursor will index tens of thousands of dependency files and start citing code you never wrote. If the indexed file count stays above ~1,000 after that, tighten the ignore list further.
If the indexer is genuinely stuck on “Indexing…” for hours rather than just slow, that is its own failure — see why Cursor indexing never completes before you blindly retry.
Apply and rollback
When the model proposes edits you get a diff. Click Apply per file, or Apply All. The two rules that save beginners:
- Read the diff first. Never
Apply Allacross 30 files in an unfamiliar project. Composer can rename, delete, and move things you did not ask about. - Stay on a branch. Run
git statusclean before you start a Composer task, then work on a feature branch. A bad accept is then one command away from clean:git restore <file>orgit checkout <file>for committed state,Cmd+Zfor an unstaged Inline edit.
If Cursor’s view of a file no longer matches what is on disk — Apply seems to ignore an edit you just made by hand — its in-memory state has drifted. Reload with a fresh window rather than fighting it; see IDE state out of sync.
Good for / not good for
| Good fit | Weaker fit |
|---|---|
| Refactoring or renaming a function | Large architecture decisions |
| Scaffolding analogous files | Long-chain, multi-hour debugging (Claude Code’s agent loop fits better) |
| Writing tests for existing code | Many reversible multi-step ops at once (git history gets noisy) |
| Explaining unfamiliar code | Anything you cannot review per-diff |
For where Cursor’s editor-bound loop stops and a terminal agent takes over, see Claude Code vs Cursor.
Your first 30 minutes, concretely
Run this on a real project, not a toy:
- 0–5 min: Install, sign in, set Sonnet 4.6 as default, open a real folder.
- 5–10 min: Add
.cursorignore, then let indexing run. Confirm the file count under Settings → Features → Codebase Indexing looks sane (hundreds, not tens of thousands). - 10–15 min: Use Cmd+L to ask “Walk me through how
[some file]is used,” referencing it with@. You are testing context injection, not editing yet. - 15–25 min: Pick one small, real edit — add a test, rename a variable across files, add types to one module. Use Cmd+K for single-block edits, Cmd+I in Plan mode for anything touching more than one file.
- 25–30 min: Read every diff. Accept what is correct, reject the rest, and
git diffto confirm reality matches the editor. That review habit is the whole skill.
FAQ
Q: When should I use Cmd+K vs Composer vs Chat? A: Cmd+K (Inline) for a single block — comments, one refactor, a type conversion. Composer (Cmd+I) for changes spanning multiple files you want to review in one place; cycle to Plan mode first for anything risky. Cmd+L (Ask) for questions that should not change code yet. Picking the wrong one wastes tokens and time.
Q: Why doesn’t Cursor seem to know about other files in my project?
A: Either the index has not finished, or you never injected context. Cursor does not silently read the whole repo for every answer. Use @ to name a file or @Codebase to search the repo, and check the indexed count under Settings → Features → Codebase Indexing.
Q: How long does the first index take, and how do I keep it fast?
A: Usually 30 seconds to a few minutes, depending on repo size. Add a .cursorignore before indexing to exclude node_modules, build output, and large data files. If the indexed file count stays above ~1,000, your ignore list is too loose.
Q: How do I roll back an AI edit I don’t like?
A: Reject the diff before pressing Apply. If you already applied, use git — git restore <file> or git checkout <file> for committed files, or Cmd+Z for an unstaged Inline edit. Always start from a clean git status on a feature branch so a bad Apply is trivially reversible.
Q: Which model should I pick as the default in 2026? A: Claude Sonnet 4.6 is the best price/performance default for daily edits. Switch up to Opus 4.7 or GPT-5.5 for hard refactors, Gemini 3.1 Pro for long-context reading, and Cursor’s Composer 2.5 when you want speed on routine multi-file changes.
Q: Is the free Hobby plan enough to learn on? A: Yes for evaluation. Hobby gives roughly 2,000 completions and a small pool of slow agent requests per month — fine to run this whole 30-minute loop. Heavy daily use hits the wall fast; Pro at $20/month (about $16 annual) adds a ~$20 model-credit pool and faster agent requests.
Related
Tags: #Cursor #AI coding