匠人学院 JR Academy
vibe-codingJR Academy

Cursor AI Coding Guide: From First Steps to Daily Workflows

Learn Cursor shortcuts, AI chat, inline editing, multi-file workflows and practical ways to review generated code.

AI toolsDeveloper productivityCursor
Cursor AI coding guide cover
Contents

Cursor is an AI coding editor built on VS Code. It brings AI assistance into the editor, so you can discuss a problem, generate code and review changes within the same workspace.

What is Cursor?

Cursor is an AI-first code editor that integrates large language models into the development workflow. Its interaction model extends beyond adding a chat extension to an editor.

Further reading: Compare the tools in our AI editor comparison, covering Cursor, Windsurf, Copilot and Google Antigravity. For agent-driven workflows, see the Google Antigravity guide.

Core capabilities

  • Chat: Ask questions and receive code suggestions inside the editor.
  • Cmd+K inline editing: Select code and describe the change you want.
  • Composer: Coordinate edits across files using project context.
  • Tab completion: Accept suggestions for your next code changes.

Getting started

1. Install Cursor

Visit cursor.com and download the version for your system:

  • macOS, including Intel and Apple Silicon
  • Windows
  • Linux

2. Import VS Code settings

During initial setup, Cursor can import your VS Code:

  • Extensions
  • Theme
  • Keyboard shortcuts
  • User settings

3. Choose an AI model

The original workflow in this guide used these model options:

ModelStrength highlighted in the guideUse case
GPT-4ReasoningComplex logic and architecture discussions
Claude 3.5 SonnetCodingDaily development and refactoring
GPT-4oSpeedShort iterations and simpler tasks

Use the model selector in your installed version to see the options available to your account.

Core features in practice

Chat with Cmd+L

Press Cmd+L, or Ctrl+L on Windows, to open AI chat:

TEXT
You: Write a React component that displays a list of users.

AI: Here is a user-list component...

Useful ways to provide context:

  • Reference a file with @: @src/utils/api.ts What does this file do?
  • Use @codebase to work with project context.
  • Use @docs to reference documentation.

Inline editing with Cmd+K

  1. Select a block of code.
  2. Press Cmd+K.
  3. Describe a specific change, such as “Add error handling.”
  4. Review the proposed edit before keeping it.

Multi-file editing with Composer

The workflow described here opens Composer with Cmd+I. Multi-file assistance can:

  • Create related files for a new feature.
  • Update dependent files during a refactor.
  • Use relationships between files as context.

Practical habits

1. Provide clear context

TEXT
Specific request:
“Add JWT authentication middleware to this Express route.
Follow the implementation in @src/middleware/auth.ts.”

Vague request:
“Add authentication.”

2. Break complex tasks into steps

  1. Ask the assistant to explain the existing code.
  2. Discuss an implementation approach.
  3. Implement one module at a time.
  4. Integrate and test the complete behavior.

3. Record project conventions

The original workflow uses a .cursorrules file in the project root:

TEXT
# Project conventions
- Enable TypeScript strict mode.
- Use function components in React.
- Use styled-components for styling.
- Handle errors in every API call.

Keep project instructions aligned with the rules supported by your installed editor version.

Common questions

Is Cursor free?

Cursor offers account plans with different AI allowances. Check the official website for the plan details and prices that apply when you sign up.

Does code leave my computer?

Cloud AI features process supplied context remotely. Review your organization's requirements and the editor's privacy settings before sending code. Exclude sensitive files and check the data handling terms of the selected service.

How can I improve responses?

  1. Supply enough relevant context.
  2. Reference the files involved with @.
  3. State the output format you expect.
  4. Split the request into steps when needed.

Build a repeatable workflow

Start with the basic shortcuts, practise writing precise requests, explore project-wide context, and review every change. The useful skill is combining assistance with your own understanding of the code.

Suggested learning sequence:

  1. Learn the basic shortcuts.
  2. Practise effective requests.
  3. Explore Composer and project context.
  4. Establish a personal review and testing workflow.

Develop your AI coding skills through JR Academy's Vibe Coding training.

Related learning resources

Continue reading

Done reading? Next steps