Skip to content
Cursor · Cheat Codes

Cursor Cheat Codes (2026): Keybinds, @-mentions & Agent Rules

Cursor's leverage is context. These shortcuts let you point the model at exactly the right files, rules and docs — instead of praying it guesses right.

Updated 2026-07-28

⌨️ Keybinds

Cheat CodeUseExample
Cmd/Ctrl+KInline edit / generateSelect code → Cmd+K → 'add error handling'
Cmd/Ctrl+LOpen chat with selectionAsk about selected code
Cmd/Ctrl+IOpen Composer / AgentMulti-file changes
TabAccept Cursor Tab suggestionPredictive multi-line edit
Cmd/Ctrl+Shift+LAdd selection to chatStack multiple selections

📎 @-mentions (context)

Cheat CodeUseExample
@FilesAttach specific files@Files src/api/user.ts
@FoldersAttach a folder@Folders src/components
@CodeAttach a symbol@Code useAuth
@DocsAttach indexed docs@Docs Stripe API
@WebLive web search@Web latest Tailwind v4 syntax
@GitDiff / commit context@Git last 5 commits
@TerminalRecent terminal output@Terminal — fix this error

📜 .cursorrules recipes

A .cursorrules file at repo root steers every request.

Cheat CodeUseExample
stack:Lock the stackReact 19, TS strict, Tailwind v4
style:Enforce styleFunctional components, no default exports
test:Test policyVitest + RTL, colocate *.test.tsx
avoid:Ban patternsNever use any, never import lodash
output:Output shapeReturn only changed files, with paths

🤖 Agent / Composer

Cheat CodeUseExample
/planAsk for a plan first/plan add auth with Supabase
/applyApply diff after plan/apply the plan you just wrote
/undoRevert last agent changeIn Composer history
/scopeRestrict scope/scope only src/routes/auth/*

Frequently asked questions

When should I use Composer vs Cmd+K?

Cmd+K for one-file, one-idea edits. Composer/Agent for changes that touch multiple files or need a plan-then-apply loop.

Does @Docs need Pro?

Adding custom docs and indexing large repos is a Pro feature. Built-in docs work on the free tier.