Appendix B: Cursor Quick Reference
Keyboard Shortcuts
| Action | Mac | Windows/Linux |
|---|---|---|
| Open chat | Cmd + L | Ctrl + L |
| Inline edit | Cmd + K | Ctrl + K |
| Accept change | Cmd + Enter | Ctrl + Enter |
| Reject change | Cmd + Backspace | Ctrl + Backspace |
| Toggle Agent/Ask | Click dropdown | Click dropdown |
@ Reference Types
| Reference | Syntax | Use When |
|---|---|---|
| Specific file | @file path/to/file.ts | You know which file to include |
| Folder | @folder src/components | Working across related files |
| Codebase | @codebase | Not sure where something is |
| Documentation | @docs React | Framework/library questions |
| Web search | @web | Need current information |
| Git history | @git | Understanding recent changes |
| Symbol | @symbol functionName | Reference a specific function/class |
Recommended Global Rules
Copy this to Settings → Cursor Settings → Rules:
- Be concise. Give the answer immediately without restating the question.
- Treat me as an expert programmer unless I ask for explanation.
- Be accurate and thorough.
- If making an educated guess, say so explicitly.
- If you need more context to answer well, ask.
- For code changes, show just the changed lines with a few lines of context.
- Don't add unnecessary comments to code.
- Follow existing patterns in the codebase.
Project Rules Template
Create .cursor/rules/project.mdc in your project root:
# Project Rules for [Project Name]
## Tech Stack
- Language: [e.g., TypeScript 5.0]
- Framework: [e.g., Next.js 14]
- Database: [e.g., PostgreSQL with Prisma]
- Testing: [e.g., Jest + React Testing Library]
## Code Style
- [e.g., Use functional components with hooks]
- [e.g., Prefer named exports over default exports]
- [e.g., Use absolute imports from @/]
## Patterns to Follow
- [e.g., API routes go in /app/api/]
- [e.g., Use Zod for validation]
- [e.g., Error handling follows existing patterns in lib/errors.ts]
## Patterns to Avoid
- [e.g., Don't use any type - always type properly]
- [e.g., Don't use class components]
- [e.g., Don't install new dependencies without asking]
YOLO Mode Safety Checklist
Before enabling auto-run mode:
- I'm using version control (Git)
- I've committed my current work
- I've set up an allowlist OR denylist
- Production credentials are NOT in my environment
//Recommended Allowlist
npm test
npm run lint
npm run build
npm run dev
yarn test
yarn lint
yarn build
pytest
python -m pytest
rails test
bundle exec rspec
cargo test
go test
//Recommended Denylist
rm
mv
kill
sudo
chmod
chown
DROP
DELETE
TRUNCATE
curl
wget
ssh
scp
Agent Mode vs Ask Mode
| Feature | Agent Mode | Ask Mode |
|---|---|---|
| Can edit files | Yes | No |
| Can run commands | Yes | No |
| Can read files | Yes | Yes |
| Can search codebase | Yes | Yes |
| Best for | Implementing features | Quick questions |
Default to Agent mode for anything that involves writing code.
Troubleshooting
//"Cursor isn't seeing my files"
- Check if the file is in
.gitignoreor.cursorignore - Try using explicit
@filereference - Check if the file is too large (>1MB may cause issues)
//"Changes aren't what I wanted"
- Be more specific in your prompt
- Include more context with @ references
- Start a fresh chat
- Break the task into smaller steps
//"Agent is stuck"
- Press Stop
- Start a new chat
- Give clearer, more specific instructions
- Break the task into smaller steps