Cursor
Cursor AI cheat sheet with keyboard shortcuts, AI-powered code generation, chat commands, and editor configuration tips with examples.

PDF · 2 pages
Cursor PDF cheat sheet
A two-page Cursor reference for printing or offline use.
Other AI Sheets
Setup
Install the Cursor desktop editor and open a project from the terminal.
Install the desktop app, sign in, and open a project folder.
# macOS or Windows: download and run the installer
# https://cursor.com/download
# Debian or Ubuntu, after adding Cursor's apt repository
sudo apt install cursor
# RHEL or Fedora, after adding Cursor's yum repository
sudo dnf install cursor
# Open the current folder (or use File > Open Folder)
cursor .Essential Shortcuts
Core keyboard shortcuts for everyday use
Access AI features quickly
# Open the Agent panel
Cmd/Ctrl+I # Toggle the Agent side panel
Cmd/Ctrl+L # Open the panel; with code selected, add it to a new chat
Cmd/Ctrl+Shift+L # Add the selection to the current chat
# Chat input
Enter # Send; queues the message while Agent is working
Cmd/Ctrl+Enter # Send now and skip the queue
Cmd/Ctrl+Shift+Backspace # Cancel generation
Shift+Tab # Rotate between Agent, Ask, Plan and Debug
# Suggested changes
Cmd/Ctrl+Enter # Accept all changes
Cmd/Ctrl+Shift+Backspace # Reject all changes
# Navigation
Cmd/Ctrl+N # New chat
Cmd/Ctrl+T # New chat tab
Cmd/Ctrl+[ # Previous chat
Cmd/Ctrl+] # Next chat
Cmd/Ctrl+W # Close chat
Esc # Unfocus the input# Example: fix selected code with Agent
1. Select the problem code
2. Press Cmd/Ctrl+L to open Agent with those lines referenced
3. Type: "Fix the type errors in this function"
4. Press Enter to send
5. Review the edits in the diff view
6. Press Cmd/Ctrl+Enter to accept all changes
# Example: follow up while Agent is busy
Enter # Queued: runs when the current task finishes
Cmd/Ctrl+Enter # Sent now: processed right awayCmd/Ctrl+K no longer opens an inline edit box: it sends your selection to Agent
# Inline edit was replaced by Agent
Cmd/Ctrl+K # Same as Cmd/Ctrl+L: open Agent with the selection referenced
# In the Agent input
Enter # Send the request
Cmd/Ctrl+Shift+Backspace # Cancel generation
# Review the edits Agent applied
Cmd/Ctrl+Enter # Accept all changes
Cmd/Ctrl+Shift+Backspace # Reject all changes
# Agents Window only
Cmd/Ctrl+K # Command palette: search across conversations# Example: refactor a function
1. Select the function
2. Press Cmd/Ctrl+K
3. Type: "Convert to async/await"
4. Press Enter
5. Watch the edit appear in the diff view
6. Accept it, or reject what you do not wantAI-powered code completions
# Accept suggestions
Tab # Accept the full suggestion
Cmd/Ctrl+Right # Accept the next word
Esc # Reject (or just keep typing)
# After an edit
Tab # Jump to the next predicted edit location
# Turn Tab on or off
Tab indicator (bottom right)
- Snooze for a chosen duration
- Disable globally
- Disable for specific file extensions
# More settings
Cursor Settings > Tab# Example: Tab completion
# Start typing a function:
function calc
# Tab accepts the multi-line suggestion:
function calculateTotal(items) {
return items.reduce((sum, item) => sum + item.price, 0)
}
# Tab again jumps to the next likely edit, even in another fileContext Management
Control what AI sees and references
Include relevant code and files
# Selection
Cmd/Ctrl+Shift+L # Add selected code to the current chat
Cmd/Ctrl+L # Add selection to a new chat
# Clipboard (code or logs)
Cmd/Ctrl+V # Paste copied code as a reference
Cmd/Ctrl+Shift+V # Paste copied code as plain text
# In the chat input
@ # Mention files, folders and other context
/ # Commands and skills
Cmd/Ctrl+Enter # Search codebase in chat
# @ mention types
@auth.ts # A file
@src/components/ # A folder
@Terminals # Terminal output
@Chats # An earlier conversation
@Browser # The built-in browser
@Commit (Diff of Working State) # Uncommitted changes
@Branch (Diff with Main) # Your whole branch diff# Example: several files
@user.model.ts @auth.service.ts How do these interact?
# Example: review what you changed
@Commit (Diff of Working State) Any bugs in this diff?
# Example: terminal output
@Terminals Why did the build fail?Set persistent coding rules and patterns
# Where rules live
.cursor/rules/*.mdc # Project rules, version-controlled
AGENTS.md # Plain Markdown rules (root or subfolders)
CLAUDE.md # Read the same way as AGENTS.md
~/.cursor/rules/ # User rule files, this machine only
Customize > Rules # User rules, synced with your account
# Rule file: .cursor/rules/api.mdc
---
description: API standards
globs: src/api/**/*.ts, src/**/*.api.ts
alwaysApply: false
---
- Use REST conventions
- Include error handling
- Add JSDoc comments
# Rule types
Always Apply # alwaysApply: true, every chat
Apply to Specific Files # globs match a file in context
Apply Intelligently # Agent decides from the description
Apply Manually # Only when you @-mention the rule
# Legacy: .cursorrules will be deprecated.
# Move it into a rule set to Always Apply.# .cursor/rules/style.mdc
---
description: Code style guide
alwaysApply: true
---
- Use TypeScript strict mode
- Prefer const over let
- Use async/await over callbacks
# Create a rule
/create-rule # In chat: Agent writes the rule file
Cmd/Ctrl+Shift+P > New Cursor Rule # Command palette
Customize > Rules > Add Rule # SidebarCursor 3 has no Memories feature in the editor: rules carry what should persist
# The Cursor 3 docs describe no Memories feature in the editor.
# Models keep nothing between chats: rules are the persistent context.
# Save a preference as a rule
/create-rule # Describe it; Agent saves a rule in .cursor/rules/
Customize > Rules # User rules for all your projects
AGENTS.md # Plain Markdown instructions in the repo
# Reuse earlier work
@Chats # Reference a previous conversation
# Where "Memories" still exists
# Automations (Cloud Agents): a tool that keeps notes across
# runs of the same automation, MEMORIES.md by default# Example: make a preference stick
You: /create-rule Always use Zod for validation
# Agent saves a rule file in .cursor/rules/
# Later chats
You: Add validation to this API
# Agent follows the rule and uses ZodAI Models & Configuration
Configure AI providers and models
Choose and switch between AI models
# Switch models
Cmd/Ctrl+/ # Loop between models
Cmd+Opt+/ # Model toggle (macOS form in the docs)
Model picker # Dropdown in the chat input
# Auto
Auto # Cursor picks a model for each request
# Defaults and keys
Cursor Settings > Models # Default model, your own API keys
Cmd/Ctrl+Shift+J # Open Cursor Settings
# Privacy Mode is not a model setting
Cursor Settings > General > Privacy Mode# Example: match the model to the task
Faster model # Quick edits and routine tasks
More capable model # Complex reasoning, multi-file refactors
Auto # Everyday work, picked per request
# Switch mid-conversation: explore with a fast model,
# then pick a stronger one for the implementationUse your own API keys
# Add a key in Cursor Settings > Models
# Providers
- OpenAI # Standard, non-reasoning chat models
- Anthropic
- Google
- Azure OpenAI # Models deployed in your Azure instance
- AWS Bedrock # Access key and secret key, or IAM roles in the dashboard
# Steps
1. Open Cursor Settings (Cmd/Ctrl+Shift+J)
2. Go to Models
3. Find the provider and paste your key
4. Click Save
# Good to know
- The provider bills you directly for the model cost
- Keys work with chat models only; Tab keeps using Cursor's models
- The key is not stored on Cursor's servers, but it is sent with every request# Example: use your own OpenAI key
Cursor Settings > Models > OpenAI
Paste the key, then click Save
# That provider's models now appear in the model picker
# If a key is invalid or rejected
# Requests to that provider fail until you update or remove the keyAgent Mode
Autonomous AI coding assistant
Let AI complete complex tasks autonomously
# Open Agent
Cmd/Ctrl+I # Open the Agent panel
Shift+Tab # Rotate between modes
Cmd/Ctrl+. # Mode menu
# Modes
Agent # Builds, refactors, fixes: edits files, runs commands
Ask # Read-only answers about your code
Plan # Writes a plan first; click Build to run it
Debug # Adds logs, asks you to reproduce, then fixes
# What Agent can do
- Search the codebase and the web
- Edit multiple files
- Run terminal commands
- Create checkpoints before significant changes
- Delegate work to subagents
# Undo
Restore Checkpoint # On an earlier message: roll the files back# Example: Agent building a feature
You: "Add user authentication with JWT"
Agent:
1. Searches for existing auth code
2. Creates the auth middleware
3. Adds login and logout endpoints
4. Updates the user model
5. Runs the tests
# Edits show up in the diff view as it works
# Example: a long-lived objective (still rolling out)
/goal fix all flaky tests and make CI greenBackground Agents are now Cloud Agents: tasks you hand off to a VM in the cloud
# Background Agents are now called Cloud Agents
# Start one
Cloud # In the dropdown under the agent input
cursor.com/agents # Web and mobile
@Cursor <prompt> # Slack or Linear
@cursor <prompt> # Comment on a GitHub PR or issue
& <prompt> # Cursor CLI: hand the message to a Cloud Agent
# What it does
- Runs in its own VM with your repo and dependencies
- Works on a separate branch and pushes it for handoff
- Opens a pull request with screenshots, videos and logs
- Keeps running after you close your laptop
# Setup
- An account admin connects GitHub, GitLab, Bitbucket or Azure DevOps
- Environment: agent-led setup, a snapshot, or .cursor/environment.json# Example: hand a task to the cloud
1. Commit or stash your local changes
2. Choose Cloud under the agent input
3. Type: "Upgrade the test runner and fix the snapshots"
4. Close the laptop; check cursor.com/agents later
5. Review the pull request and its artifacts
# Example: from Slack
@Cursor fix the login bug in the checkout flowAdvanced Features
Power user features and integrations
Access all commands quickly
# Open the command palette
Cmd/Ctrl+Shift+P # Command palette
# Commands named in the docs
"New Cursor Rule" # Create a project rule
"Open Agents Window" # Agent-first window
"Open IDE" # Back to the editor
"Reindex" # When Agent misses files
"Cursor: Attempt Update" # Check for an update
"Cursor Settings" # Open Cursor Settings
"Keyboard Shortcuts" # Remap any key
"Developer: Export Logs" # Logs for a support request
"Show Running Extensions" # CPU and memory per extension
"Terminal: Select Default Profile" # The shell Agent uses# Example: common palette workflows
Cmd/Ctrl+Shift+P > "New Cursor Rule"
# Name it, write the instructions, pick the rule type
Cmd/Ctrl+Shift+P > "Reindex"
# When Agent does not find files it should
Cmd/Ctrl+Shift+P > "Delete Old Chats", then "GC Agent KV Blobs"
# Frees disk space used by old Agent chatsDifferent conversation modes for specific tasks
# Built-in modes (mode picker in the Agent panel)
Agent # Edits files and runs commands
Ask # Read-only questions
Plan # Reviewable plan, then Build
Debug # Runtime evidence, then a targeted fix
# Switch modes
Shift+Tab # Rotate between modes
Cmd/Ctrl+. # Mode menu
# Custom Modes: a skill kept on for the whole session
/ # Open the menu and pick a skill
Enter # Use the skill for one message
Opt/Alt+Enter # Use it as a Custom Mode (or choose Use as Mode)# .cursor/skills/code-review/SKILL.md
---
name: code-review
description: Review code for bugs, security issues and improvements.
icon: shield
color: blue
---
Check input validation, error handling and missing tests.
# Use it as a mode
# Type /, pick code-review, press Opt/Alt+Enter
# The badge stays in the chat input until you exit the modeConnect with external tools
# Cloud Agent integrations
# Connect at cursor.com/dashboard > Integrations
GitHub # @cursor on a PR or issue starts a Cloud Agent
Slack # @Cursor <prompt> in a channel
Linear # Delegate an issue to Cursor, or @Cursor in a comment
Bugbot # Automatic pull request review
# Bugbot on a pull request
cursor review # Comment to trigger a review (or: bugbot run)
cursor review verbose=true # Also list the rules it used
.cursor/BUGBOT.md # Project-specific review guidelines
# MCP servers: tools and data for Agent
.cursor/mcp.json # Project servers
~/.cursor/mcp.json # Global servers
Customize (sidebar) # Browse, add and toggle servers
# Deeplinks: share a prompt, command or rule
cursor://anysphere.cursor-deeplink/prompt?text=<text>
https://cursor.com/link/prompt?text=<text># Example: .cursor/mcp.json
{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["-y", "mcp-server"],
"env": { "API_KEY": "${env:API_KEY}" }
},
"kb": {
"url": "https://api.example.com/mcp",
"headers": { "Authorization": "Bearer ${env:MY_SERVICE_TOKEN}" }
}
}
}
# Example: Bugbot
1. Connect your repository provider in the dashboard
2. Open a pull request
3. Bugbot comments with bugs and suggested fixesTips & Best Practices
Get the most out of Cursor
Optimize AI understanding
# Best practices
1. Mention the files you mean
@auth.service.ts, not "the auth file"
2. Include the error
Paste the message or stack trace, or use @Terminals
3. Write project rules
.cursor/rules/*.mdc for patterns Agent should always follow
4. Plan before big changes
Shift+Tab to Plan mode for work that touches many files
5. Start a new chat for a new task
Cmd/Ctrl+N when you finish a feature or switch tasks
6. Watch the context ring
Click it to see what fills the context window# GOOD: specific context
@user.model.ts @auth.service.ts
"Add password reset with email verification"
# BAD: vague
"Fix the login"
# GOOD: include the error
[paste the TypeError stack trace]
"Fix this type error"
# Side question without derailing the main chat
/side how does the token refresh work?Keep Cursor running smoothly
# Performance tips
1. Find a slow extension
cursor --disable-extensions
Then re-enable extensions one at a time
2. Ignore large generated folders
Add dist/, build/ and .next/ to .cursorignore
3. Turn Tab off where you do not need it
Tab indicator (bottom right): snooze, or disable per file extension
4. Free disk space used by old chats
Cmd/Ctrl+Shift+P > "Delete Old Chats", then "GC Agent KV Blobs"
5. See what each extension costs
Cmd/Ctrl+Shift+P > "Show Running Extensions"# .cursorignore (same syntax as .gitignore)
dist/
build/
.next/
*.min.js
**/logs
!app/ # Negate: do not ignore
# Already ignored by default:
# .gitignore entries, .env*, .git/, node_modules/, lock filesQuick fixes for common problems
# Common issues and fixes
"Tab suggestions not appearing"
- Plan limit reached (free plans have a Tab allowance)
- Network blocks HTTP/2: Cursor Settings > Network > HTTP Compatibility Mode
- Old version: Cmd/Ctrl+Shift+P > "Cursor: Attempt Update"
"Agent does not see my files"
- Check .cursorignore and .gitignore
- Cmd/Ctrl+Shift+P > "Reindex"
- Attach the file with @
"A rule is not applied"
- The file must end in .mdc
- Apply Intelligently needs a description
- Apply to Specific Files needs a pattern that matches
"Agent went the wrong way"
- Cmd/Ctrl+Shift+Backspace or the Stop button
- Restore Checkpoint on an earlier message
"Cursor is slow"
- cursor --disable-extensions
- Add generated folders to .cursorignore# Report a bad response
1. Open the three-dot menu at the bottom of the response
2. Choose Copy Request ID
3. Post on forum.cursor.com with the ID, the steps to
reproduce, your OS and your Cursor version
# Look for errors
Help > Toggle Developer Tools # Console errors
Cmd/Ctrl+Shift+P > "Developer: Export Logs"
# MCP server problems
Output panel > MCP Logs