Setup and Basics

Setup and Basics

Getting Cursor running on your machine takes about five minutes. Getting it configured well for your project takes another ten. This lesson covers both.

Installing Cursor

Go to cursor.com and download the installer for your operating system. On macOS you get a .dmg; on Windows an .exe; on Linux a .AppImage or .deb. Install it like any other desktop application. When you open it the first time you will be asked to sign in or create an account — a free tier exists, though some features (especially heavy Composer use) require a paid plan.

Importing your VS Code settings

If you already use VS Code, open the Command Palette (Cmd/Ctrl + Shift + P) and type "Cursor: Import VS Code Settings". This copies your theme, keybindings, and extensions in one step. After this, Cursor looks and feels exactly like your VS Code setup.

If you are starting fresh, pick a theme from the welcome screen and install extensions as needed from the Extensions panel (same as VS Code).

The Cursor interface

The interface has everything VS Code has, plus four Cursor-specific areas:

Sidebar chat button: A chat icon in the left sidebar opens the AI chat panel. You can also use Cmd/Ctrl + L.

Composer button / shortcut: Cmd/Ctrl + I opens an inline Composer for small tasks; Cmd/Ctrl + Shift + I opens the full Composer panel for large tasks.

Model selector: In the chat and Composer panels there is a dropdown to choose which model to use (e.g. Claude 3.5 Sonnet, GPT-4o, cursor-small for fast tasks). You can change this per conversation.

Context pills: When you open Chat or Composer, you see a bar at the top where you can attach files, folders, or symbols. These are your context pills — they tell the AI exactly what to look at.

Opening a project

Cursor works with folders, just like VS Code. Open a folder with File → Open Folder, or from the terminal: cursor . in your project directory. Cursor will index the project files so the AI can search them when needed.

Verifying inline completion works

Open any file, put your cursor on a blank line, and type a comment describing what you want:

python
# function that returns the fibonacci sequence up to n

Within a second or two you should see gray ghost text suggesting a function body. Press Tab to accept. If you do not see it, check Settings → Cursor → Enable Autocomplete and make sure it is on.

Key keyboard shortcuts to memorize

ActionMacWindows/Linux
Accept inline suggestionTabTab
Reject inline suggestionEscapeEscape
Open ChatCmd + LCtrl + L
Open Composer (inline)Cmd + ICtrl + I
Open Composer (full)Cmd + Shift + ICtrl + Shift + I
Command PaletteCmd + Shift + PCtrl + Shift + P

Choosing a model

Cursor gives you access to multiple models. As a rule of thumb:

  • cursor-small or GPT-4o-mini: Fast, cheap, good for simple completions and quick chat questions.
  • Claude 3.5 Sonnet or GPT-4o: Stronger reasoning, better for complex code, refactors, and Composer tasks. Slower and uses more credits.
  • Claude 3 Opus / GPT-4: Strongest but slowest. Reserve for truly complex architectural questions or debugging hard problems.

Start with the default (usually GPT-4o or Claude 3.5 Sonnet) and switch if you feel a task needs more or less power.

Configuring .cursorignore

Just like .gitignore, Cursor supports a .cursorignore file. List folders or files you do not want the AI to read (e.g. large node_modules, build artifacts, files with secrets). This keeps context clean and fast.

code
node_modules/ dist/ .env *.lock

Create this file in your project root before you start working.

A first real task

Once setup is done, try this: open a file in your project, select a function, press Cmd/Ctrl + L to open Chat, and type: "Explain what this function does and list any potential bugs."

The AI will describe the function in plain English and often catch things like missing error handling, off-by-one errors, or type mismatches. This is a taste of how Cursor becomes a second pair of eyes on your code.