MeshWorld India Logo MeshWorld.
Cheatsheet Cursor AI Editor IDE Developer Tools 8 min read

Cursor AI Editor Cheat Sheet: Features, Shortcuts & Workflows

Darsh Jariwala
By Darsh Jariwala
| Updated: May 16, 2026
Cursor AI Editor Cheat Sheet: Features, Shortcuts & Workflows
TL;DR
  • Cursor is a VS Code fork with AI natively built in — composer, inline edits, chat, and autocomplete all in one editor
  • Tab (Tab) accepts AI completions inline; Cmd+K (Ctrl+K) opens inline edit mode
  • @ references attach context (files, folders, docs, symbols) to any AI prompt
  • Rules for AI (Cmd+L → settings → Rules) set per-project behavior and conventions
  • Composer (Cmd+L) handles multi-file changes, new features, and refactors across your codebase
  • Debugger integration generates step-by-step debugging plans from stack traces

Quick reference tables

Installation & setup

| Task | Command / Action | |---|---| | Download | cursor.com → Download (macOS, Windows, Linux) | | Sign in | Cmd+, → Accounts → Sign in with GitHub | | Update | Auto-updates in the background | | Check version | Cmd+, → Cursor Health | | Reset usage | Cmd+, → Account → Reset usage |

Core AI commands

| Action | Shortcut | What it does | |---|---|---| | Open Chat | Cmd+L | Open AI chat panel (side or full) | | Inline Edit | Cmd+K | Edit selected code with AI | | Accept completion | Tab | Accept Cursor Tab suggestion | | Reject completion | Esc | Reject and write normally | | Next suggestion | Alt+] | Cycle to next Tab suggestion | | Prev suggestion | Alt+[ | Cycle to previous Tab suggestion | | Quick ask | Cmd+Enter | Ask about selected code | | Generate file | Cmd+Shift+K | Generate new file from prompt | | Cmd+P palette | Cmd+P | Quick file open (standard VS Code) |

Composer (Cmd+L → New Tab)

The Composer tab handles complex multi-file changes:

| Action | What it does | |---|---| | Type /compose in chat | Opens Composer mode | | Describe feature | AI writes code across multiple files | | Type /fix | Diagnose and fix errors in Composer | | Type /explain | Explain how a feature or flow works | | Type /test | Generate tests for selected code | | Cmd+Enter | Apply Composer changes (create + open files) | | Cmd+\ | Toggle Composer in sidebar vs full pane |

Context references (@)

Attach files, folders, docs, or symbols to any prompt:

| Syntax | What it attaches | |---|---| | @file:path/to/file | Single file contents | | @folder:path/to/folder | Entire folder (all files) | | @docs:url | Web documentation URL | | @git:message | Recent commits | | @search:query | Code search results | | @symbols:name | Symbols matching name | | @clipboard | Current clipboard contents | | @problems | Current lint/problem panel |

bash
# Example: explain a file with its test and recent commits
@file:src/auth/login.ts @file:src/auth/login.test.ts @git:5

Inline edit workflow

  1. Select code or place cursor where you want changes
  2. Press Cmd+K → type your instruction
  3. Cursor shows a diff preview (highlighted in red/green)
  4. Press Tab to accept, Esc to reject
  5. Press Cmd+Z to undo the AI change

Tab autocomplete settings

Cmd+, → Cursor → Tab → Configure behavior:

| Setting | Options | |---|---| | Enable Tab | Toggle on/off | | Tab insert mode | “Replace suggestion” or “Insert at cursor” | | Gibbs model | Model used for Tab completions | | Max distance | How far back Cursor looks for context |


Rules for AI (Project Instructions)

Project-level instructions that tell Cursor how to behave:

Cmd+L → settings (top-right gear) → Rules → Add Rule

Or create .cursor/rules/ directory with .md files:

markdown
# .cursor/rules/typescript.md

- Always use explicit return types on exported functions
- Prefer `interface` over `type` for object shapes
- Use Zod for runtime validation of external data
- No `any` — use `unknown` + type narrowing
markdown
# .cursor/rules/project.md

- Project uses Next.js App Router
- API routes go in `src/app/api/`
- Server Components by default, Client Components use "use client"
- Use Tailwind for all styling
- Environment variables in `.env.local`

Apply rules per folder using .cursor/rules/ or globally via Cmd+, → Rules.


Composer workflows

Write a new feature

plaintext
/compose

Create a new feature for user notifications:
- Create src/services/notification.ts with send() and schedule() functions
- Add notification API route at src/app/api/notifications/route.ts
- Create a React hook useNotifications in src/hooks/useNotifications.ts
- Add unit tests in src/services/notification.test.ts
- Update src/app/globals.css with notification styles

Refactor a module

plaintext
/compose

Refactor src/database/queries.ts:
- Convert to use Drizzle ORM patterns
- Add connection pooling
- Move raw SQL to separate migration files
- Keep the same public API (exported functions)
- Preserve all existing tests

Debug a stack trace

Paste the full error stack trace into Composer:

plaintext
/fix

[Error stack trace here]

The error happens in src/middleware/auth.ts at line 47.
Fix it and explain what caused it.

Debugger integration

Cursor reads your stack traces and generates debugging plans:

  1. Run your code until it throws an error
  2. Copy the full stack trace from the terminal
  3. Open Composer (Cmd+L → New Tab)
  4. Paste the stack trace and type /fix
  5. Cursor analyzes the trace and suggests:
    • The exact line causing the error
    • What the expected vs actual values are
    • A corrected version of the problematic code
    • An explanation of the root cause

For breakpoints and step-through debugging:

  • F5 — Start debugger (standard VS Code)
  • F9 — Toggle breakpoint
  • F10 — Step over
  • F11 — Step into
  • Shift+F11 — Step out

Model selection

Cmd+, → Models → Choose default and per-task models:

| Model | Best for | |---|---| | Cursor Spark (default) | Fast Tab completions, inline edits | | Claude 4 Sonnet | Complex reasoning, architecture | | Claude 4 Opus | Large refactors, multi-file changes | | GPT-4.1 | Quick explanations, simple fixes | | Gemini 2.5 Pro | Long-context analysis |

Composer and Chat can use different models. Tab completions use a separate fast model.


Best practices

Effective prompt writing

Be specific about the outcome, not just the change:

plaintext
❌ "Fix the login bug"
✅ "When a user submits the login form with an invalid email,
    the error message should appear inline below the email field
    (not in a toast). The field border should turn red (#ef4444).
    Do not change the API route or any server-side logic."

Chain context with @

plaintext
❌ "@fix the auth bug"
✅ "@file:src/middleware/auth.ts @file:src/app/login/page.tsx
    @file:src/hooks/useAuth.ts
    The auth middleware is rejecting valid tokens on Vercel
    deployment but works locally. Fix it."

Use Rules for consistency

  • Add a .cursor/rules/ folder in project root
  • One file per convention (typescript.md, styling.md, api.md)
  • Rules apply to all AI interactions in that project

Summary

  • Cmd+K — Inline AI edit; Tab — Accept completion
  • Cmd+L — Chat; Cmd+L → New Tab — Composer
  • @ symbols attach context: files, folders, docs, git history
  • Rules for AI enforce project conventions in every AI interaction
  • Composer handles multi-file features, refactors, and debugging plans
  • Tab completions are fast and local; Composer uses cloud models

FAQ

How does Cursor differ from GitHub Copilot? Cursor is a VS Code fork with AI built into every surface — inline edits, chat, composer, Tab completion, and debugger integration all in one. Copilot is an extension running inside a separate editor. Cursor’s Composer can make multi-file changes in one pass; Copilot fills individual completions.

Can I use my own API key? Yes. Cmd+, → Models → Add custom model → enter your API key for OpenAI, Anthropic, or Google.

Does Cursor work with JetBrains IDEs? Cursor is a VS Code fork only. For JetBrains, use the native Junie AI or Codeium.

How do I stop Cursor from suggesting code I don’t want? Use Tab with Esc to reject. For persistent suppression, add the file to .cursorignore or tighten the model in Cmd+, → Models → Tab model.

Can Cursor access the internet? Not natively. Use @docs:url to attach specific URLs as context, or use @search:query to search your codebase only.

Is Cursor free to use? Cursor has a free tier with limited Composer uses per month. Pro is $20/month for unlimited access. Tab completions are always free.