How do I use the Cursor AI code editor?
Set up your first project
Open Cursor and choose File, then Open Folder, to load a project from your computer. Cursor works best when it can see the whole project, so open the folder that contains your code rather than a single file. The first time you launch it, you will be asked to sign in and to pick basic settings, including whether to import VS Code settings.
Cursor is built on the same foundation as VS Code, so the file explorer, terminal and extensions will feel familiar. If you have used VS Code before, most of its shortcuts still work. Plan names and free-tier limits can change, so check the official Cursor pricing page before you rely on any specific allowance.
- Open a folder, not a single file
- Sign in to your Cursor account
- Use the built-in terminal to run your project
- Check the pricing page for current limits
Use the AI features in daily work
Tab completion suggests code as you type and accepts a suggestion when you press Tab. Chat lets you ask questions about your code, such as what a function does or where a bug might be. Composer is designed for larger changes that touch several files, and it shows proposed edits so you can accept or reject them.
Start with small, specific requests. Asking for input validation on one form handler gives better results than asking the AI to make the whole app better. Review the diff before you accept it, and run your tests after each change so mistakes are caught early.
Keep your work safe
Commit your project to Git before large AI-driven edits. That gives you a clean way to undo changes that do not work. Also avoid pasting passwords, API keys or private customer data into prompts, and keep secrets in environment files that are excluded from version control.
Common mistakes
- Accepting large AI-generated edits without reading the diff.
- Opening a single file instead of the whole project, which limits what the AI can see.
- Putting API keys or passwords directly into code or chat prompts.
