Install Cursor & Set Up Your Environment
Installing Cursor and Basic Setup
Cursor is one of the most popular AI coding IDEs right now. It's built on VS Code with Claude / GPT models baked in. Get the tool installed and memorize the shortcuts — everything after this will go smoother.
Download and Install
- Go to the official site: https://cursor.com
- Download the version for your OS (macOS / Windows / Linux).
- Run the installer. On first launch, you can pick "Import VS Code Settings" to carry over your existing config.
Login and Model Selection
- Sign in with Google / GitHub to get trial credits.
- Model recommendation:
Claude/GPT-4for highest quality,GPT-3.5is faster and works fine for drafts. - Stick with defaults for now. Adjust later based on latency and cost.
Essential Shortcuts
Cmd/Ctrl + K: Generate or modify code at the current cursor position (you'll use this the most).Cmd/Ctrl + L: Open the chat sidebar for multi-turn conversations.Cmd/Ctrl + Shift + I: Open Composer for cross-file refactoring.Cmd/Ctrl + Shift + P: Command palette — quickly switch models or toggle features.
Configuration Tips
- Turn on "Auto Suggest" in settings for faster completions.
- Add your common directories to the
Workspaceso Cursor can build its index. For large projects, trigger a global search once to warm up the index. - If you're working with a team, set up your Git credentials and make sure
git statusworks properly.
Practice
- Create a new file
hello.ts, hitCmd/Ctrl + Kand type: "Write a function that prints Hello JR Academy and export it." - Check the generated code, then tweak the prompt to add parameter validation. Notice how fast the feedback loop is.
📚 相关资源
❓ 常见问题
关于本章主题最常被搜索的问题,点击展开答案
Cursor 在哪里下载?支持哪些操作系统?
官网 cursor.com,提供 macOS / Windows / Linux 安装包。第一次启动时勾 "Import VS Code Settings" 可以把已有 VS Code 的快捷键 / 主题 / 扩展全部继承过来,不用重新配。
Cursor 怎么登录?是不是要付费才能用?
用 Google 或 GitHub 账号登录就有免费试用额度,够走完整个 Vibe Coding 入门方向。重度使用(每天几十次 Cmd+K)才需要订阅 Pro。先用免费档跑通流程,确认对自己有用再升级。
Cursor 默认用哪个模型?什么时候该手动切换?
默认走 Claude / GPT-4 这类高质量模型,适合需要正确性的真实代码任务。GPT-3.5 速度更快、成本更低,适合写一次性 draft、命名建议、注释翻译这类"错了也无所谓"的场景。日常先保持默认,遇到延迟问题或 token 烧得快再切。
Cursor 最常用的 4 个快捷键是哪些?
(1) Cmd/Ctrl + K — 在光标位置生成或修改代码,最高频;(2) Cmd/Ctrl + L — 打开对话侧栏,适合多轮讨论;(3) Cmd/Ctrl + Shift + I — 打开 Composer,做跨文件 refactor;(4) Cmd/Ctrl + Shift + P — 命令面板,快速切换模型 / 开关功能。先把这 4 个练成肌肉记忆,剩下的后面遇到再学。
大型项目第一次用 Cursor 卡顿怎么办?
是索引还没建好。打开项目后先手动触发一次全局搜索(Cmd/Ctrl + Shift + F 随便搜个关键字),让 Cursor 对整个 workspace 建索引,之后 Cmd+K / Cmd+L 调 context 才会快。把常用目录显式加到 Workspace 也能避免 Cursor 漏扫。索引完成后第二次打开秒开。