Cursor A Symbol
# Cursor @ Symbol
In Cursor, the @ symbol is a powerful tool for quickly accessing and referencing various contextual information, helping users interact with AI more efficiently.
Entering "@" in any AI interaction scenario (such as the βK command panel, chat window, or terminal) triggers a context-related menu that automatically filters and recommends the most relevant resources within the current project (such as files, code snippets, documents, etc.).
!(#)
* Keyboard operations: Use the β/β arrow keys to navigate, and press Enter to confirm your selection. If you choose a category (such as @Files), the list will further filter specific resources under that category.
* File reading strategy: For file references, you can switch between "full read" and "summary read" modes by pressing Ctrl/β M (e.g., full-text reference or just key parts).
* * *
## @ Symbol
The @ symbol supports the following main commands:
| **Function** | **Description** | **Use Case** |
| --- | --- | --- |
| **@Files** | References an entire file as context. Supports file path previews and chunked processing. | When you need to reference specific file content, such as code files or documents. |
| **@Folders** | References an entire folder as context. | When you need to provide a large number of files as context, such as a project directory. |
| **@Code** | References a specific code snippet as context. | When you need to query or operate on a particular code segment. |
| **@Codebase** | Searches for important files or code blocks within a codebase and reorders them based on relevance. | When you need to find related code or files across the entire codebase. |
| **@Git** | Scans Git commits, diffs, or pull requests to help identify issues. | When you need to analyze Git-related information, such as commit records or code differences. |
| **@Web** | Searches web information as additional context. | When you need to obtain the latest online information or external resources. |
| **@Docs** | References pre-defined third-party documents or custom documents. Supports adding custom documents. | When you need to reference external documents or a custom knowledge base. |
| **@Definitions** | References all nearby definitions as context. | When you need to reference definitions of variables, functions, etc. in the current code. |
| **@Chat** | Adds the current chat message as context. | When you need to reference previous conversation content during a chat. |
### Advanced Usage Tips
**Combining Commands:** Entering @Files src/utils/helper.js @Codebase allows you to simultaneously reference a specified file and link it to the global context of the codebase, generating highly customized code.
**Dynamic Resource Integration:** Paste links starting with @ (such as @https://api.example.com/docs), and Cursor will automatically parse the content and incorporate it into the context.
**Privacy and Configuration Management:** Use the **.cursorignore** file (similar to .gitignore) to exclude sensitive files or directories from indexing. In Settings > Features > Docs, add custom document links to expand the coverage of @Docs.
### Typical Application Scenario Examples
**1. Code Generation**
* Command: Generate user login functionality @Files src/models/user.js @Docs https://jwt.io/introduction
* Result: Generates secure authentication logic based on the existing user model and official JWT documentation.
**2. Error Troubleshooting**
* Command: Explain the cause of this error @Code lines 12β25 @Git HEAD~1
* Result: Analyzes potential issues by combining the code segment with recent commit history.
**3. Cross-File Refactoring**
* Command: Convert class components into functional components @Folders src/components @Codebase
* Result: Batch converts while ensuring compatibility with global styles and state management.
AI is thinking...
[](#)[Cursor Code/Cursor Commands](#)
(#)[](#)
[VolcEngine's Coding Plan supports mainstream large models such as Doubao, GLM, DeepSeek, Kimi, MiniMax, etc., offering stable and reliable official direct access. Configuration guide Β₯9.9/monthβopen now](https://maas.xfyun.cn/modelSquare?ch=maas_lm_l2E)
YouTip