0% found this document useful (0 votes)
959 views5 pages

3 +Cursor+IDE+Cheatsheet

The document provides a cheatsheet on things that can be done with the Cursor AI editor including how to set it up, open chat windows, generate and refactor code, document code, create unit tests, and ask questions about projects and programming.

Uploaded by

DerEldf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
959 views5 pages

3 +Cursor+IDE+Cheatsheet

The document provides a cheatsheet on things that can be done with the Cursor AI editor including how to set it up, open chat windows, generate and refactor code, document code, create unit tests, and ask questions about projects and programming.

Uploaded by

DerEldf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Cursor AI Editor Cheatsheet

A complete list of things you can do with Cursor and how you can
do them.

Table of Contents
Setting up Cursor 2
Open chat window 2
Open inline chat 2
Generate code from a comment 3
Autocomplete code from partial code 3
Accept only a word from a suggestion 3
Show alternative suggestion 3
Show previous suggestion 3
Fix code 3
Refactor code 4
Document code 4
Create unit tests 5
Ask questions about your project 5
Ask general programming questions 5
Setting up Cursor
Cursor editor can be downloaded from its of cial website https://cursor.sh/. Once you
download, install it and you are good to go.

Open chat window


Press the icon located in the top right corner of Cursor. Alternatively, press CTRL + L or
CMD + L. The chat window will open on the left side bar.

Open inline chat


Press CTRL + K or CMD + K to open the inline chat.
fi
Generate code from a comment
This feature is currently not available in Cursor. As an alternative, you can start the inline
chat with CTRL + L or CMD + L and write a query in the inline chat to generate some
code.

Autocomplete code from partial code


This feature is currently not available in Cursor. As an alternative, you can start the inline
chat with CTRL + L or CMD + L and write a query in the inline chat to generate some
code.

Accept only a word from a suggestion


The autocomplete and suggestion feature is not currently available in Cursor.

Show alternative suggestion


The autocomplete and suggestion feature is not currently available in Cursor.

Show previous suggestion


The autocomplete and suggestion feature is not currently available in Cursor.

Fix code
Select the code that has an issue. Press CTRL + K or CMD + K to show the inline chat. Ask
the AI to x your code like in the following example. Then, press Accept if you want to
accept the updated code.
fi
Refactor code
Select the code which you want to refactor. Press CTRL + K or CMD + K to show the inline
chat. Ask the AI to refactor your code like in the following example. Then, press Accept if
you want to accept the updated code.

Document code
Select the code you want to document. Press CTRL + K or CMD + K to show the inline
chat. Ask the AI to document your code like in the following example. Then, press Accept
if you want to accept the doc string.
Create unit tests
Create a new le manually in your project directory (e.g., test_app.py). Open that empty
le and press CTRL + K or CMD + K to open the inline chat. Then, write "generate unit
test for @foo". The unit test will be generated inside test_app.py leaving the code of the
other le untouched.

Ask questions about your project


Access the chat using the chat icon located on the left side of VS Code and or by
pressing CTRL + L or CMD + L and write your questions the chat. Cursor can answer
questions about your project since it has access to your les.

Ask general programming questions


Access the chat using the chat icon located on the left side of VS Code or by pressing
CTRL+ L or CMD + L and ask your question there.
fi
fi
fi
fi

You might also like