Lesson 2 of 5·10 min read

Cursor Setup & Workflows

Cursor is the most-used AI coding tool for professional developers in 2026. As a VS Code fork, it offers the familiar environment — extended with deep AI integration that goes far beyond autocomplete.

Installation & Basic Configuration

First Steps

  1. Download: cursor.com → installer for macOS, Windows, or Linux
  2. VS Code import: Cursor automatically imports extensions, settings, and keybindings
  3. Account: Pro plan ($20/month) or Business plan ($40/month) for teams
  4. Model selection: Settings → Models → choose default model (Claude Sonnet 4, GPT-4.1, etc.)

Model Selection Strategy

ModelStrengthIdeal For
Claude Sonnet 4Balanced, fast, good codeEveryday development
Claude Opus 4Deep reasoning, complex architecturesDifficult bugs, design decisions
GPT-4.1Broad knowledge, good instruction followingMulti-language, documentation
Gemini 2.5 ProLarge context windowLarge codebases, long documents

Project Indexing & Context

Codebase Indexing

Cursor indexes your entire project for semantic search:

  • Automatic: Cursor indexes when opening a project
  • Reindex: Cmd/Ctrl + Shift + P → "Reindex Project" after major changes
  • Exclusions: .cursorignore (like .gitignore) for files that shouldn't be indexed

Context Management

Cursor uses various context sources:

  • @file: Reference a specific file as context
  • @folder: Include an entire folder
  • @codebase: Semantic search across the whole project
  • @web: Web search for current documentation
  • @docs: Include official documentation (Next.js, React, etc.)
  • @git: Git history as context

.cursorrules — Project-Specific Instructions

What Is .cursorrules?

A file in the project root that gives Cursor project-specific instructions — similar to a system prompt for your project.

Example .cursorrules File

# Project: E-Commerce Platform

## Technology Stack
- Next.js 15 (App Router)
- TypeScript (strict mode)
- Tailwind CSS + shadcn/ui
- Supabase (PostgreSQL + Auth)
- Vitest for tests

## Code Conventions
- Functional components with TypeScript
- Named exports (no default export)
- German comments, English variable names
- Prefer Server Components, Client Components only for interactivity
- All text via next-intl i18n

## Architecture Rules
- API routes under src/app/api/
- Shared components under src/components/ui/
- Business logic in src/lib/
- No direct Supabase calls in components — always via lib/

Keyboard Shortcuts

Essential Key Combinations

ShortcutFunction
TabAccept autocomplete suggestion
Cmd/Ctrl + KInline edit — edit code at cursor position
Cmd/Ctrl + LOpen chat panel
Cmd/Ctrl + IOpen Composer (multi-file edits)
Cmd/Ctrl + Shift + IAgent mode in Composer
@ + filenameReference file as context

Workflow: Inline Edit vs. Chat vs. Composer

  • Inline edit (Cmd+K): Small, local changes — rewrite a function, rename a variable
  • Chat (Cmd+L): Ask questions, get explanations, generate individual code snippets
  • Composer (Cmd+I): Larger changes across multiple files — implement new feature, refactoring

Pro tip: Start with Chat to discuss the approach. Then switch to Composer for implementation. Use Inline Edit for fine-tuning. This three-part split is the most productive workflow.