Cursor Advanced Tips
Composer Feature
Press Cmd/Ctrl + I to open Composer for cross-file editing:
- Describe your desired changes
- AI generates a modification plan
- Preview and confirm changes
- Apply to multiple files at once
@ References
Use @ in AI chat to reference:
@file- Reference specific files@folder- Reference entire folders@code- Reference selected code@web- Search web information
Rules Configuration
Create .cursorrules file to define project standards:
json
{
"rules": [
"Use TypeScript",
"Follow ESLint rules",
"Write unit tests"
]
}Efficiency Tips
- Provide context: Select relevant code before asking
- Step-by-step: Break complex tasks into smaller steps
- Verify output: Test AI-generated code
- Build templates: Save常用 prompts as templates