Cursor
Topics
Pages
Content
An AI-focused IDE for creating and updating code, tab auto-completion, and for chats with persistent history.
Read more on the Features page of the Cursor website.
Launch
Open a project from the command-line:
$ # e.g.
$ cursor .
$ # e.g.
$ cursor my-repo
Features
The main actions you can do.
Code
On macOS, COMMAND+K.
Here is an example of using code editing to apply changes inline:
Tab auto-completion
Press tab in your code. Get a result for one or multiple lines.
This is called Cursor Tab or Cursor++.
Chat
On macOS, COMMAND+L.
Applying code changes directly can be limiting without a conversation first and without getting an explanation out. So use the chat pane to ask to have a conversation and then ask for changes, then apply them.
Terminal
Ask questions in the terminal. On macOS, COMMAND+K.
For Bash:
For Python:
For SQLite:
Usage tips
How to get the most out of the features above
Add to chat
Select code and press COMMAND+L or COMMAND+SHIFT+L to add multiple pieces of code to the chat context. If you select code and paste with COMMAND+V then that works too. Or click “Add to chat”, which is the message instead of “Chat” if there is already code.
@ mentions
Use the “@” symbol either in the code writing/editing or in the chat, so you can reference with objects like specific files or classes.
Choose existing 3rd-party documentation:
Codebase reference
In that chat, use the option to reference the whole base rather than the current file (this will be more expensive but can give you a better solution by understanding multiple files and the suggestions can be across files).
This can be done with by clicking the with codebase button or pressing COMMAND + ENTER.
Scope of changes
When getting code changes, apply for the whole while or just specific lines.
Comments
You can write code comments for your requirements before you have code or a function name without a body, then use the tab auto-completion to complete your code.
Even if you don’t use AI to fill out the comments, you can fill it in yourself manually or come back to it another day or share with someone else.
Documentation
If Cursor does not understand a library or tool that is out of the training data, then you can give it a URL for a documentation page.
Or go through “@” mentions and pick Add new doc.
Manage docs under Cursor’s settings:
System prompt
Go to Cursor settings and set the system prompt so you get code that is consistent with what you expect.
See LLM page for some samples.
Upload images
You cannot upload an image to the prompt like with other genAIs but you can reference a file in your project with GPT-4.