Everything you need to master Cursor AI. A megathread 🧵

@kevinkern
Kevin Kern@kevinkern
23 views Dec 05, 2024 ~2 min read
Advertisement
1
Everything you need to master Cursor AI.

A megathread 🧵
Media image
2
Cursor is an AI Code Editor (a fork of Visual Studio), that writes and edits code for you.

You can build apps, saas, games, basically anything you can imagine.


@kevinkern
Kevin Kern@kevinkern
Here is a Flappy Bird clone in Cursor AI and Swift.

I have now refactored my previous boilerplate, which should be easier to adopt.

Synchronization between Cursor and XCode is working with a few buttons.

Thats progress for today.
3
1/ Download Cursor for Free

And you can try Cursor Pro for two weeks free of charge.
0:04
4
2/ AI Autocomplete

Cursor`s autocomplete looks at all your code to guess what you’ll type next (context aware). It knows how your project is set up, so suggestions fit better.
0:10
5
3/ AI Chat

The Chat feature allows you to ask questions or request edits for specific parts of your code, and it applies changes directly to the file.
0:06
6
4/ Composer - Generate Code

Composer understands your code structure and can create or update several files based on a single instruction.
0:09
7
5/ Mobile Apps

Use Cursor and XCode together to ship your apps faster.


@kevinkern
Kevin Kern@kevinkern
Cursor + Swift UI

Here is an example of a simple todo application with cursor and synced changes in XCode.
8
6/ Composer - Save, Reject, Reapply, Apply

💾 Save - Temporarily saves changes and lets you test your features
🛑 Reject - Means you don't accept a change if you're not happy with it.
🔄 Reapply - Bring back Rejected files.
✅ Apply - Finalize and save to the codebase.
Media image
9
7/ Agents

Agents kick off the process of automated coding. They not only generate your code. They can also spawn the database and run services.


@kevinkern
Kevin Kern@kevinkern
Watch Cursor Agent Build Your App and Database.

Agents handle multi-file edits, terminal commands, and full project context.

+ Huge automation potential.
- Error-prone if the agent is not configured correctly.
10
8/ File Tagging

Choose exactly where AI should make changes.


@kevinkern
Kevin Kern@kevinkern
Cursor Tip #5: Be very specific when working with a larger codebase and composer.

- Give cursor a hint how you want to build it
- Tell it in which file and where it should made changes.
- Double Check the changes (don't take it for granted)
- Use `Save All` to test it. And use `Apply` to confirm it.
- Always backup with git for a major change

Here is an example prompt:
Media image
11
9/ Cursorrules

Let you customize AI to follow consistent coding, naming, and formatting rules.


@kevinkern
Kevin Kern@kevinkern
Cursor Quick Tip #1: "Cursorrules"

With .𝐜𝐮𝐫𝐬𝐨𝐫𝐫𝐮𝐥𝐞𝐬 you can give instructions to the AI.

This helps the AI to understand how you want your code and descriptions to be written.

For example:

1) "use camelCase for variable names"
2) "Always use Composition API and
Actions
What You Can Do
  • Export as PDF or Markdown
  • Batch Export to Notion
  • Bookmark & Highlight
  • Screenshot Tweet
Create Free Account

Includes 7-day Premium trial

Advertisement