Cursor Tutorial 3 - Master Chat (Cmd L) for Problem Solving
When should you use Chat (Cmd+L)? Learn how to leverage context for better results.
By SunnyD | Original Post
We've covered two of Cursor's core features: Tab and Command Palette (Cmd+K). Now let's master Chat (Cmd+L).
When to Use Chat
As mentioned in our Command Palette guide, Chat handles general programming questions.
Chat shines through multi-turn conversations. One answer rarely solves complex problems. Through dialogue, AI understands your needs better and guides you to the right solution.
Use Chat when you need to:
- Learn programming concepts, new tech, or frameworks
- Get code advice and best practices
- Debug and troubleshoot
Core Features
Like ChatGPT, Cursor's Chat offers flexible coding assistance. Ask anything.

Two features set Cursor apart:
- Quick context with @ references
- Direct code changes with Apply
You won't find these in ChatGPT or other code editors.
Apply
Apply lets you use AI's code suggestions right away.
Review changes in the diff view. Accept or reject with one click.
While Chat can modify code, use these for specific changes:
- Command Palette (Cmd+K): Local changes
- Composer: Multi-file changes
Context with @
Type @ in any AI input box - Command Palette, Chat, or Composer - to reference context.

Chat and Composer share similar @ abilities. Command Palette has limited context options since it focuses on local changes.
Context matters because of:
AI's Limits:
- AI knows a lot, but not everything. Some tech areas remain blind spots.
Project Specifics:
- Each project has unique patterns and needs. Without context, AI can't tailor solutions.
Smart Context Use
How do you use context well?
Think of context as AI's cheat sheet. Two rules:
- Pick what matters: Include relevant info, skip the rest
- Find the sweet spot: Give enough but not too much. Too little leaves AI confused. Too much creates hallucinations.
Give AI just what it needs. No more, no less.
Context comes from two places:
Internal
External
Internal Context
Internal context helps AI understand your project's complexity.
Cursor offers context ranges, from small to large:
Code < Files ≈ Git < Folders < Codebase
This range lets you match context to your problem's scope.
Code/Files/Folders
Choose based on scope:
- Code: Specific snippets from current file
- Files: Entire files (including images)
- Folders: All files in a directory
For large files, Chat reads in chunks. It picks relevant parts based on your question.
Enable long context to include entire files or folders.
Command Palette skips larger contexts like Folders and Codebase. It stays focused on local code.
Git
Git context shows your code's evolution.
Cursor offers these Git contexts:

Use for code review, optimization, and bug fixes:
- PR (Diff of Main Branch): Changes from main
- Pending changes (Commit:Diff with Working State): Unstaged changes
- Perfect for generating commit messages
- Committed Changes: All repository commits
Beyond @Git, use the Beta Review feature in the AI Panel.
Enable it in Cursor settings:
Review streamlines Git code analysis:

Enter custom review commands above. Select context below, like with @Git.
Codebase
@Codebase scans your entire project for comprehensive context.
Perfect for large projects and cross-file analysis.
It uses RAG to vectorize and store your project locally.
Check indexing status in settings:
@Codebase offers two search modes:

Embedding mode searches local vectors directly.
Reranker mode adds sorting and analysis:

Reranker works better for comprehensive project analysis.
External Context
External context opens AI's world view. It brings in fresh, relevant knowledge.
Cursor offers @Doc and @Web for external info.
Doc
@Doc brings in documentation to expand AI's knowledge.
Reference specific versions or latest docs for your tech stack.
Cursor includes common docs like React:

Add custom docs in settings:
Provide a URL. Cursor fetches all related docs.
Web
@Web searches online for answers.
Use @Web directly in Chat for auto-search:

Or @URL for specific pages:

Context Templates - Notepad
Notepad stores reusable context templates.
With Notepad, you can:
- Create custom context: Add project details, coding standards, or snippets
- Reference anywhere: Use in Chat or Composer

Notepad unifies context management. It keeps AI aligned with your project's needs.
Add text and file references to build templates.
Ideally, Notepad would support more reference types, combining all context types we've covered.
Wrap Up
Chat (Cmd+L) handles everything from simple code questions to complex project discussions.
The key? Smart context use. That's what unlocks its full power.