Cursor AI Editor Complete Guide | VS Code-Based AI Coding Tool
이 글의 핵심
Cursor is a VS Code-based AI coding editor. Through Tab autocomplete, AI Chat, and Composer (agent mode), you can write complete feature code, fix bugs, and explore codebases alongside AI.
What is Cursor?
Cursor is an AI-first code editor forked from VS Code. It has grown rapidly since 2024 and is now the most widely used AI coding editor in 2026.
How it differs from traditional editors:
Traditional editor: Write code → Search → Check docs → Write more code
Cursor: "Add this feature" → AI creates/edits files → Review → Apply
Installation & Setup
Installation
Download from cursor.com (macOS, Windows, Linux)
Migrate your VS Code extensions and settings:
- On first launch, Cursor offers to import your VS Code settings automatically
Model Settings
Go to Cursor Settings → Models to choose:
| Model | Notes |
|---|---|
claude-sonnet-4-6 | Latest, fast responses, excellent code quality |
claude-opus-4-5 | Most powerful, complex tasks |
gpt-4o | Fast, general-purpose tasks |
cursor-small | Very fast, simple autocomplete |
Using Your Own API Key (Recommended)
Cursor Settings → Models → Add Model → Enter API Key
- No request limit
- Immediate access to the latest models
- Pay only for actual usage
Core Feature 1: Tab Autocomplete
Place your cursor and AI predicts what comes next.
def calculate_fibonacci(n: int) -> # Press Tab...
# → def calculate_fibonacci(n: int) -> list[int]:
# if n <= 0:
# return []
# elif n == 1:
# return [0]
# ...
Tip: Describe your intent in a comment first for more accurate code generation.
# Auth middleware: validate JWT token then attach user_id to the request
def auth_middleware(request): # Tab → full implementation generated
Core Feature 2: AI Chat (Ctrl+L / Cmd+L)
Ask questions about your code or request changes.
Using @ References
@filename Add a specific file to context
@foldername Add an entire folder to context
@Codebase Search relevant code across the whole codebase
@Web Reference latest info with a web search
@Docs Reference specified official documentation
#filename Point to a specific part of the current file
Real-world examples:
# Debugging errors
Explain why this error is happening:
TypeError: Cannot read property 'map' of undefined
at @src/components/PostList.tsx:23
# Code review
@src/api/auth.ts Find security vulnerabilities in this auth code
# Codebase exploration
@Codebase Where is user authentication handled?
# Official docs reference
@Docs[React 18] What's the best practice for data fetching with Suspense?
Core Feature 3: Composer (Ctrl+I / Cmd+I)
Agent mode — automatically creates and modifies multiple files.
Usage Example
Prompt: "Add a user profile editing feature.
- PUT /api/users/:id endpoint
- Allow editing nickname and profile image URL
- Include validation
- Use existing auth middleware"
→ Cursor automatically:
✅ Edits src/routes/users.ts
✅ Creates src/validators/userValidator.ts
✅ Updates src/types/user.ts
✅ Creates tests/users.test.ts
Composer Pro Tips
# 1. Provide clear context
Refer to @src/models/User.ts and @src/routes/ to
add a new Comment model and CRUD API
# 2. Incremental approach
First just create the Comment model (with migration)
→ review →
Now add the Comment API router
# 3. Use checkpoints
Review Composer's changes at each step
If there's a problem: "Leave this file as-is and only modify the rest"
.cursorrules Configuration
Create a .cursorrules file in your project root to define AI behavior.
Python Project Example
# .cursorrules
You are an expert Python developer working on a FastAPI project.
## Code Style
- Use Python 3.12+ features actively (match/case, type hints, etc.)
- Functions must always include type hints
- Variable names: snake_case, class names: PascalCase
- Maximum line length: 100 characters
## Framework Rules
- Use FastAPI's dependency injection system (Depends)
- Use Pydantic v2 models
- Async processing: prefer async/await
- Error handling: use HTTPException
## Forbidden
- No global variables
- Use logging instead of print()
- Separate hardcoded values into environment variables
## Testing
- Use pytest
- Write unit tests for every function
- Use given/when/then pattern
TypeScript Project Example
# .cursorrules
You are an expert TypeScript developer working on a Next.js 15 project.
## Tech Stack
- Next.js 15 (App Router)
- TypeScript strict mode
- Tailwind CSS + shadcn/ui
- Zustand (state management)
- React Query (server state)
## Code Rules
- Prefer Server Components by default
- Minimize 'use client' directives on client components
- No use of type any
- Use type instead of interface
## File Structure
- Components: src/components/[feature]/[ComponentName].tsx
- Server actions: src/actions/[feature].ts
- API routes: src/app/api/[feature]/route.ts
Cursor vs VS Code + Copilot
| Feature | Cursor | VS Code + Copilot |
|---|---|---|
| Tab Autocomplete | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
| Multi-file Editing | ✅ Composer | ❌ |
| Codebase Search | ✅ @Codebase | ⚡ Limited |
| Agent Mode | ✅ | ❌ |
| Model Selection | ✅ Many options | GPT-4o focused |
| VS Code Plugins | ✅ Compatible | ✅ Native |
| Price | $20/month Pro | $10/month |
| Privacy | Code sent to server | Code sent to server |
Real-World Workflows
Adding a New Feature (Using Composer)
1. Open Composer with Cmd+I
2. Add context: @relevant-files
3. Write your request:
"Add payment processing.
Use Stripe SDK.
Reference the Order model in @src/models/Order.ts.
Include retry logic on failure."
4. Review generated files (diff viewer)
5. Accept All or accept individually
Bug Fixing (Using Chat)
1. Copy the error message
2. Open Chat with Cmd+L
3. Paste error + @current-file
4. "Explain the cause of this error and how to fix it"
5. Apply the suggested code with the Apply button
Automated Code Review
# Paste a git diff into Chat and ask:
"In these changes, find:
1. Potential bugs
2. Performance issues
3. Security vulnerabilities"
Useful Shortcuts
| Shortcut (Mac) | Action |
|---|---|
Tab | Accept AI suggestion |
Esc | Reject AI suggestion |
Cmd+L | Open AI Chat |
Cmd+I | Open Composer |
Cmd+K | Inline edit |
Cmd+Shift+L | Add selected code to Chat |
Cmd+Enter | Include full codebase search in Composer |
Conclusion
Cursor is more than just an autocomplete tool — it fundamentally changes how you collaborate with AI. You’ll see the biggest productivity gains in adding new features, exploring codebases, and refactoring.
Related posts: