What is Cursor?
Cursor is a code editor (based on VS Code) with AI deeply integrated. You get everything VS Code has - syntax highlighting, extensions, git, terminal - plus three major AI features:
| Feature | How to open | What it does |
|---|---|---|
| AI Chat | Ctrl+L | Chat with AI about your code, ask questions, get explanations |
| Inline Edit | Ctrl+K | Select code, describe a change, AI edits it in place |
| Composer | Ctrl+I | Multi-file AI that can create and edit across your whole project |
| Tab completion | Automatic | AI suggests the next lines as you type - press Tab to accept |
Install Cursor
- Go to
cursor.com - Click Download - it auto-detects your OS (Windows/Mac/Linux)
- Run the installer (same as any desktop app)
- Open Cursor - it will ask to import VS Code settings (click Yes if you use VS Code)
- Sign up or log in with Google/GitHub
After login, Cursor will ask which AI model to use. Select claude-sonnet-4-6 (or the latest Claude model listed) for the best coding results.
AI Chat Panel
The chat panel (Ctrl+L) lets you talk to AI about your code. You can reference files using the @ symbol:
# Ask about the current file (it's automatically in context):
"Explain what this file does"
"Find any potential bugs in this code"
"What does the getUserById function return?"
# Reference a specific file with @:
"In @UserModel.php, why does the login() method fail when remember_me is true?"
# Reference your whole codebase:
"@codebase - where is the email validation logic?"
# Ask for code:
"Write a function to validate a phone number in Indian format (+91 XXXXX XXXXX)"
Inline Edit (Ctrl+K)
This is the most powerful day-to-day feature. Select any code, press Ctrl+K, type what you want changed, and the AI edits it right there:
# With a function selected:
"Add input validation - check that $email is a valid email and $age is between 18 and 120"
"Convert this to use PDO prepared statements"
"Add error handling with try/catch"
"Make this function async"
# With an HTML block selected:
"Add Bootstrap classes to make this a responsive card"
"Convert this table to a mobile-friendly format"
"Add form validation attributes"
# With a CSS block selected:
"Add a dark mode version using prefers-color-scheme"
"Make this responsive for mobile"
After the AI shows the change, you see a diff view. Press Ctrl+Enter to accept or Escape to reject.
Composer - Multi-file AI
Composer (Ctrl+I) is Cursor's equivalent to Claude Code - it can create and edit multiple files at once. Use it for bigger tasks:
# Create a new feature:
"Create a contact form with:
- HTML form in /pages/contact.php
- PHP handler in /api/contact-submit.php
- Email sending using PHPMailer
- Success/error redirect back to the form"
# Modify across files:
"Add a 'last_login' column to the users table.
Update UserModel.php to set it on login.
Show it in the admin/users.php table."
# Refactor:
"Move all database query functions from functions.php into
a new UserModel class in /models/UserModel.php"
Cursor vs Claude Code
| Cursor | Claude Code | |
|---|---|---|
| Interface | GUI editor (like VS Code) | Terminal / CLI |
| Best for | Inline editing, file-by-file work | Autonomous multi-file tasks, running code |
| Tab completion | Yes (as you type) | No |
| Run commands | Limited (via terminal tab) | Full shell access |
| File creation | Asks in chat/composer | Does it autonomously |
| Learning curve | Lower (visual IDE) | Higher (terminal-based) |
| Recommendation | Start here if you prefer GUI | Graduate to this for serious projects |
The professional workflow: Cursor open for editing code line by line. Claude Code in a terminal tab inside Cursor for running larger tasks. Switch between them freely. They share the same files on disk so changes from one are instantly visible in the other.