I’ll be honest—when I first installed Cursor AI, I was overwhelmed. The interface looked exactly like VS Code (because it is a fork), but I had no idea how to actually use the AI features. I clicked around randomly for about 20 minutes before finally figuring out the basics.
After three months of daily use, I’ve learned that Cursor is incredibly powerful once you know what you’re doing. The problem is that the learning curve isn’t well-documented. Most tutorials assume you already know what Composer mode is or how Tab autocomplete works.
I’ve been using Cursor AI as my primary code editor for the past three months, and I wish someone had shown me this guide on day one. It would have saved me hours of trial and error.
Let me walk you through exactly how to use Cursor AI, from installation to advanced features. This is the complete guide I wish I’d had when I started.
Quick Start Summary
Before we dive deep, here’s what you need to know:
What You’ll Learn:
– How to install and set up Cursor AI
– How to use Tab autocomplete (the basic feature)
– How to use Cmd+K for inline edits
– How to use Composer for multi-file editing
– Essential keyboard shortcuts
– Pro tips I learned the hard way
Prerequisites:
– Basic coding knowledge (any language)
– Willingness to spend $20/month (or use free tier)
– Comfort with VS Code-style editors
Time to Get Started: 15 minutes to install and learn basics, 1-2 hours to get comfortable with all features
Step 1: Download and Install Cursor
Getting the Installer
The installation process is straightforward, but there are a few gotchas:
For Mac:
1. Go to cursor.com
2. Click “Download for Mac”
3. Download will start automatically (file: Cursor-[version].dmg)
4. Open the DMG file
5. Drag Cursor to the Applications folder
6. Open Cursor from Applications
For Windows:
1. Go to cursor.sh
2. Click “Download for Windows”
3. Run the installer (Cursor Setup [version].exe)
4. Follow the installation wizard
5. Launch Cursor from the Start menu
For Linux:
1. Go to cursor.sh
2. Download AppImage or .deb file
3. For AppImage: chmod +x Cursor-[version].AppImage && ./Cursor-[version].AppImage
4. For deb: sudo dpkg -i cursor_[version]_amd64.deb
First Launch
When you first open Cursor, you’ll see a screen that looks exactly like VS Code. Don’t panic—this is expected. Cursor is a VS Code fork, so everything you know about VS Code applies here.
What happens on first launch:
– Cursor will ask if you want to import VS Code settings
– You’ll be prompted to sign in (required for AI features)
– The welcome screen will show basic tutorials
My recommendation: Import your VS Code settings if you have them. It makes the transition seamless. All your extensions, themes, and keybindings will carry over.
Step 2: Sign Up and Choose a Plan
Creating an Account
You can’t use Cursor’s AI features without an account. Here’s how to set it up:
- Click “Sign In” button (top right)
- Choose sign-in method:
- GitHub (easiest, one-click)
- Complete authentication
- You’re in!
Understanding the Plans
Free Tier (2,000 completions/month):
– Basic Tab autocomplete
– Limited Cmd+K requests
– No Composer mode access
– Good for: Trying out Cursor, hobby projects
I burned through the 2,000 completions in about 5 days of regular use. It’s fine for testing, but you’ll hit the limit fast if you code daily.
Pro Plan ($20/month):
– Unlimited Tab completions
– Full Composer mode access
– GPT-4 powered AI
– Priority support
– Advanced codebase indexing
My take: If you code more than a few hours per week, the Pro plan is worth it. The free tier is too limiting for professional use.
Step 3: Understanding the Three Main AI Features
Cursor has three distinct AI features, and understanding the difference is crucial:
Feature 1: Tab Autocomplete (The Basics)
What it is: Inline code suggestions as you type, similar to GitHub Copilot.
How to use it:
1. Start typing code normally
2. Gray suggestion appears inline
3. Press Tab to accept
4. Press Esc to reject
5. Keep typing to ignore
When to use it: All the time. This is the bread-and-butter feature you’ll use constantly.
Real example from yesterday:
I typed:
function calculateTax(
Code language: JavaScript (javascript)
Cursor suggested:
function calculateTax(amount, rate) {
return amount * rate;
}
Code language: JavaScript (javascript)
I pressed Tab, and boom—done. Saved me 10 seconds of typing.
Acceptance rate: I accept about 70% of Tab suggestions without modification. The other 30% I either ignore or tweak slightly.
Feature 2: Cmd+K (Inline Editing)
What it is: Ask AI to edit a specific selection of code.
How to use it:
1. Select code you want to modify
2. Press Cmd+K (Mac) or Ctrl+K (Windows/Linux)
3. Type instruction in natural language
4. Hit Enter
5. AI generates modified code
6. Accept or reject the change
When to use it: When you want to modify existing code—refactoring, adding error handling, changing logic, etc.
Real example I used last week:
Selected this code:
const data = await fetch('/api/users');
const users = await data.json();
Code language: JavaScript (javascript)
Pressed Cmd+K, typed: “add error handling”
Cursor changed it to:
try {
const data = await fetch('/api/users');
if (!data.ok) throw new Error('Failed to fetch users');
const users = await data.json();
} catch (error) {
console.error('Error fetching users:', error);
throw error;
}
Code language: JavaScript (javascript)
Perfect. Accepted immediately.
Feature 3: Composer (Multi-File Editing)
What it is: an AI-powered assistant that can edit multiple files simultaneously while understanding your entire codebase.
How to access it:
1. Click the Composer icon (top right), or
2. Press Cmd+Shift+I (Mac) or Ctrl+Shift+I (Windows/Linux)
When to use it: For tasks that span multiple files—adding features, refactoring systems, creating new modules.
Real example from this morning:
Opened Composer and typed: “Add rate limiting middleware to all API endpoints”
Cursor:
1. Created middleware/rateLimiter.js
2. Updated routes/api.js to use the middleware
3. Modified app.js to initialise the middleware
4. Updated tests/api.test.js with rate-limiting tests
All four files were edited correctly in about 30 seconds. This single feature is why I pay $20/month.
Step 4: Mastering Tab Autocomplete
Let me share the techniques that increased my acceptance rate from 40% to 70%:
Write Clear Function Names
Bad (vague):
function process(d) {
Code language: JavaScript (javascript)
Good (specific):
function calculateMonthlyRevenue(orders) {
Code language: JavaScript (javascript)
With the good naming, Cursor suggested almost exactly what I needed. With the bad naming, it hallucinated random logic.
Use Comments as Hints
This trick is gold. Write a comment describing what you want, and Cursor will implement it:
// Create a React component that displays a user profile
// with name, avatar, bio, and a follow button
Code language: JSON / JSON with Comments (json)
Press Enter, and Cursor will generate the entire component. I use this all the time for quick scaffolding.
Accept Partially, Then Edit
You don’t have to accept the entire suggestion. Sometimes I’ll:
1. Accept the suggestion with Tab
2. Immediately edit the parts that aren’t quite right
This is faster than rejecting and rewriting from scratch.
Learn the Patterns
After a few days, you’ll notice Cursor has patterns:
– It loves error handling (sometimes too much)
– It prefers verbose variable names
– It follows the style of your existing code
Once you know these patterns, you can predict what it’ll suggest and work with it instead of against it.
Step 5: Using Cmd+K for Inline Edits
Here are the commands I use most often with Cmd+K:
Refactoring
Select code → Cmd+K → "extract this into a separate function"
Select code → Cmd+K → "convert this to async/await"
Select code → Cmd+K → "simplify this logic"
Code language: JavaScript (javascript)
Adding Features
Select function → Cmd+K → "add input validation"
Select function → Cmd+K → "add TypeScript types"
Select API call → Cmd+K → "add retry logic with exponential backoff"
Code language: JavaScript (javascript)
Fixing Issues
Select code → Cmd+K → "fix the bug where [describe issue]"
Select code → Cmd+K → "make this more performant"
Select code → Cmd+K → "handle edge cases"
Code language: JavaScript (javascript)
Best Practices for Cmd+K
Be specific: “Add error handling” is vague. “Add try-catch with custom error messages” is better.
Select enough context: If you select just one line, Cursor might not understand the full picture. Select the entire function or logical block.
Review before accepting: Cmd+K can hallucinate. Always review the changes before hitting Accept.
Step 6: Mastering Composer Mode
Composer is the killer feature that justifies the $20/month price tag. Here’s how to use it effectively:
When to Use Composer
Good use cases:
– Adding a new feature that touches multiple files
– Refactoring a system (authentication, database layer, etc.)
– Setting up testing infrastructure
– Migrating APIs or updating dependencies
Bad use cases:
– Quick one-line changes (use Tab or Cmd+K)
– Exploring code you don’t understand yet
– Fixing tiny bugs
How to Write Good Composer Prompts
Bad prompt:
“Add authentication”
Too vague. Cursor won’t know what you mean.
Good prompt:
“Add JWT authentication to the Express API. Create middleware that verifies tokens, update all protected routes to use the middleware, and add login/signup endpoints.”
Specific, actionable, clear scope.
My formula for Composer prompts:
1. State the goal (“Add JWT authentication”)
2. Explain the approach (“Create middleware that verifies tokens”)
3. List affected files/areas (“Update all protected routes”)
4. Specify what to create (“Add login/signup endpoints”)
Real Composer Examples
Example 1: Adding tests
Create comprehensive tests for the user service.
Use Jest. Test all CRUD operations, edge cases, and
error handling. Put tests in tests/services/user.test.js.
Code language: PHP (php)
Composer created 150 lines of well-structured tests in 20 seconds.
Example 2: Refactoring database layer
Refactor the database queries to use a repository pattern.
Create a UserRepository class, move all user-related
queries from the routes into the repository, and update
the routes to use the repository methods.
Code language: JavaScript (javascript)
Composer updated eight files with consistent, working code.
Reviewing Composer Changes
Critical: Always review what Composer did before accepting.
The Composer panel shows you:
– Which files were changed
– A diff view of each change
– Option to accept or reject each file individually
I typically:
1. Scan through all changed files quickly
2. Focus on the critical logic (not boilerplate)
3. Accept changes file by file
4. Test immediately after accepting
Step 7: Essential Keyboard Shortcuts
These shortcuts will 10x your Cursor workflow:
AI Features
Tab– Accept autocomplete suggestionEsc– Reject autocompleteCmd+K/Ctrl+K– Inline edit selectionCmd+Shift+I/Ctrl+Shift+I– Open ComposerCmd+L/Ctrl+L– Open chat panel
Navigation (same as VS Code)
Cmd+P/Ctrl+P– Quick file openCmd+Shift+P/Ctrl+Shift+P– Command paletteCmd+B/Ctrl+B– Toggle sidebarCmd+J/Ctrl+J– Toggle terminal
Editing (same as VS Code)
Cmd+D/Ctrl+D– Select next occurrenceCmd+Shift+L/Ctrl+Shift+L– Select all occurrencesOption+Up/Down/Alt+Up/Down– Move line up/downCmd+//Ctrl+/– Toggle comment
Pro tip: Print this list and keep it next to your monitor for the first week. Muscle memory takes time.
Step 8: Customising Cursor Settings
Accessing Settings
Cmd+, (Mac) or Ctrl+, (Windows/Linux) to open settings.
Important Settings to Adjust
Cursor > Autocomplete > Enabled
– Default: On
– My setting: On (obviously)
– Why: Core feature, keep it enabled
Cursor > Autocomplete > Delay
– Default: 150ms
– My setting: 100ms (faster suggestions)
– Why: I type fast, want instant suggestions
Cursor > Chat > Model
– Default: GPT-4
– My setting: GPT-4 (best quality)
– Alternative: GPT-3.5 (faster, less accurate)
Cursor > Indexing > Auto-index On Save
– Default: On
– My setting: On
– Why: Keeps codebase context updated automatically
Theme and Appearance
Cursor supports all VS Code themes. My recommendations:
– Dark: One Dark Pro, Dracula, Night Owl
– Light: GitHub Light, Atom One Light
– Install: Extensions → Search theme name → Install
Common Problems and Solutions
Problem 1: “Cursor is slow to suggest”
Causes:
– Large codebase not fully indexed
– Poor internet connection
– Too many extensions running
Solutions:
1. Wait for initial indexing to complete (status bar shows progress)
2. Disable unused extensions
3. Check internet connection (AI runs in cloud)
Problem 2: “Suggestions are terrible”
Causes:
– Unclear function/variable names
– Not enough context in the file
– AI doesn’t understand your codebase yet
Solutions:
1. Write clearer code with descriptive names
2. Add comments explaining complex logic
3. Use Composer to give explicit instructions
Problem 3: “Hit the free tier limit”
Solutions:
1. Upgrade to Pro ($20/month)
2. Be more selective about accepting suggestions
3. Use Cmd+K and Composer instead of relying only on Tab
Problem 4: “Composer makes wrong changes”
Solutions:
1. Write more specific prompts (see Composer section above)
2. Review changes before accepting
3. Give Composer more context in your prompt
4. If it’s wrong, reject and try again with a clearer prompt
Pro Tips I Learned the Hard Way
Tip 1: Use .cursorignore
Create a .cursorignore file in your project root to exclude files from indexing:
node_modules/
dist/
build/
*.log
.env
This makes indexing faster and prevents the AI from getting confused by generated files.
Tip 2: Write Code Consistently
Cursor learns from your codebase. If you write code inconsistently (mixing styles, patterns, and naming conventions), the suggestions will be inconsistent too.
Pick a style and stick to it. Use a linter. Cursor will follow your lead.
Tip 3: Composer Works Best with Planning
Before using Composer for big changes, I now:
1. Write down what I want in plain English
2. List which files will change
3. Paste that plan into Composer
This structure dramatically improves Composer’s output.
Tip 4: Don’t Trust It Blindly
I learned this the hard way after accepting a Composer change that introduced a security vulnerability. Always review:
– Authentication/authorisation logic
– Database queries (SQL injection risks)
– API endpoints (parameter validation)
– Error handling (don’t expose sensitive info)
Cursor is smart, but it’s not infallible.
Tip 5: Keep a “Snippets” File
I created a snippets.md file in my project with common patterns:
# Common Patterns
## Express Route Handler
...
## React Component Structure
...
## Database Query Pattern
...
Code language: PHP (php)
When I need something similar, I open this file. Cursor sees it and suggests code matching those patterns.
Real-World Workflow Example
Here’s how I actually use Cursor during a typical coding session:
Scenario: Adding user profile editing to a web app
Step 1: Planning (5 minutes)
– Open Composer
– Describe the full feature: “Add user profile editing. Users should be able to update their name, bio, and avatar. Create API endpoint, validation, and React component.”
Step 2: Let Composer scaffold (2 minutes)
– Composer creates:
– routes/profile.js (API endpoint)
– components/ProfileEditor.jsx (React component)
– validators/profile.js (validation logic)
– Updates to routes/index.js
Step 3: Review and refine (10 minutes)
– Review each file Composer created
– Use Cmd+K to tweak specific functions
– Tab autocomplete fills in edge cases
– Add tests using Composer
Step 4: Test and iterate (15 minutes)
– Run the app, test manually
– Fix bugs with Cmd+K
– Add error handling where needed
Total time: 32 minutes for a complete feature that would have taken me 90 minutes manually.
Next Steps: Going Deeper
Once you’re comfortable with the basics, explore these advanced topics:
Advanced Features
- Codebase chat: Ask Cursor questions about your code
- Terminal integration: Use AI in the integrated terminal
- Custom instructions: Set project-specific AI rules
- Multi-file search: Find patterns across your codebase
Integration with Your Workflow
- Set up Git integration
- Configure linters to work with Cursor
- Customize keybindings
- Install complementary extensions
Learn from the Community
- Join the Cursor Discord server
- Follow @cursor_ai on Twitter
- Read the official docs at cursor.sh/docs
- Share tips with your team
My Final Advice After 3 Months
Start small. Don’t try to use every feature on day one. Master Tab autocomplete first, then add Cmd+K, then Composer.
Be patient. The first week feels clunky. By week two, you’ll be 2x faster. By week three, you won’t want to code without it.
Invest in the Pro plan. The free tier is too limiting. If you’re serious about productivity, the $20/month pays for itself in time saved.
Review everything. Don’t blindly accept AI suggestions. Cursor is a tool, not a replacement for thinking.
Customise to your workflow. Adjust settings, shortcuts, and prompts to match how you code. There’s no “right” way to use Cursor—find what works for you.
After three months, Cursor has genuinely changed how I code. I’m faster, I handle more complex tasks, and honestly, coding is more fun when the AI handles the boring stuff.
Give it two weeks. If you’re not significantly more productive by then, I’ll be shocked.
Frequently Asked Questions
Can I use Cursor with my existing projects?
Yes. Just open your project folder in Cursor as you would in VS Code. Cursor will index your codebase automatically. All your files, Git history, and structure work exactly the same.
Does Cursor work offline?
No. The AI features require an internet connection since they run on cloud servers. However, the editor itself works offline—you just won’t get AI suggestions until you’re back online.
Can I use Cursor with [programming language]?
Cursor supports all languages that VS Code supports: JavaScript, TypeScript, Python, Java, C++, Go, Rust, PHP, Ruby, and dozens more. The AI works best with popular languages, but is functional with any language.
Is my code sent to Cursor’s servers?
Yes, for AI processing. Cursor sends code snippets to their servers (powered by OpenAI and Anthropic) to generate suggestions. If you have strict privacy requirements, check their privacy policy or consider alternatives like Tabnine with on-premise deployment.
Can I use Cursor on multiple computers?
Yes. Your Pro subscription allows you to use Cursor on any computer. Sign in with the same account, and you’re good to go. Settings don’t sync automatically, but you can export/import them manually.
What happens if I cancel my Pro subscription?
You revert to the free tier (2,000 completions/month). You don’t lose access to Cursor itself, just the unlimited usage and advanced features like Composer.
How does Cursor compare to GitHub Copilot?
I’ve used both extensively. Cursor has better multi-file editing (Composer), better codebase understanding, and more accurate suggestions. Copilot has wider IDE support and costs half as much. For VS Code users who want maximum power, I prefer Cursor. For teams using multiple IDEs, Copilot makes more sense.
For a detailed comparison, check out my Cursor vs GitHub Copilot article.
Can I use Cursor with GitHub Copilot at the same time?
Technically, yes, but I don’t recommend it. The suggestions conflict, and it’s confusing. Pick one AI assistant and master it.
Related Articles
- Cursor AI Review 2025: Is It Worth $20/Month?
- Cursor vs GitHub Copilot: Which is Better?
- Best AI Code Editors in 2025
- Advanced Cursor Tips and Tricks (Coming soon)