匠人学院 JR Academy
Skip to article
Learning guide
Cursor Guide

Learn Cursor workflows for context-aware coding, multi-file changes, prompt design, and project speed.

3 chapters·11 guides·Access varies by chapter
AI Chat
On this page

AI Chat in Cursor

Use natural-language discussion to explain code, draft snippets and diagnose a specific problem using relevant repository context.

#Open the conversation

The source uses Cmd/Ctrl + L for chat and Cmd/Ctrl + Shift + L for a new conversation. Cursor's commands and bindings have changed between versions; check Keyboard Shortcuts↗ in your installation.

#Ask concrete questions

text
What does this function do? How would infinite scrolling fit this React component? Explain this error using the attached code.

Select code before opening the conversation, attach a file, or use supported @ references. Prefer the actual file/function picker over assuming historical textual forms such as @function: work in every version.

#Useful request patterns

text
Explain the responsibility and control flow of this code. Review this diff for logic errors and compatibility risks. Generate meaningful unit tests for this function. Improve this component's rendering performance without changing its behavior.

For example, attach src/hooks/useCreateUser.ts and the exact error Type 'undefined' is not assignable to type 'string', rather than saying only “it fails.”

#Work through a conversation

You might first draft a form-state hook, then add validation, then submission state. Keep the scope visible and inspect each change. Clear stale context or start a new conversation when the task changes; inspect the attached files instead of assuming every mention remains permanently active.

#Break complex work into steps

For an authentication task, define the data structures, implement the existing API contract, add token validation and test the intended behavior. Do not delegate undefined security policy to a generated snippet.

#Choose the right interaction size

Discussion and local snippets suit chat. A coordinated feature spanning multiple files suits the supported agent/multi-file workflow. These are workflow distinctions, not permanent claims that a current chat interface cannot edit more than one file.

#Review reply actions

Apply changes only after checking the diff. Copy and Insert place code into the editor; neither verifies correctness. If an edit targets the wrong location, save/check the file, inspect the intended target and apply a bounded correction.

For slow responses, check connectivity, available model options and excessive context rather than relying on the source's historical model recommendation.

#Next steps

Published by
JR Academy
Learning resources

Individual authors and reviewers are credited where recorded.

Vibe Coding

AI coding workflows, tools, and practical habits

Build a stronger AI-assisted development workflow from scratch.

Open Vibe Coding →

Related Roadmaps

FAQ

Cursor 是免费的吗?
Cursor 提供免费版(Hobby)和付费版(Pro)。免费版可以使用基础的 AI 功能,但高级模型(如 Claude 3.5 Sonnet, GPT-4o)有使用次数限制。
Cursor 能直接导入 VS Code 的插件吗?
可以。Cursor 是基于 VS Code Fork 开发的,支持一键从 VS Code 迁移所有插件、主题和快捷键设置。
Cursor 的隐私模式安全吗?
Cursor 提供 "Privacy Mode",开启后你的代码不会被存储在服务器上,也不会用于训练模型,适合企业级开发。

Done reading? Next steps