Introduction to Cursor
Cursor is a code generation editor collaborated with OpenAI, which can automatically write code based on user input and modify and interpret it using ChatGPT technology.
Cursor is currently open to individuals and businesses, with both free and paid versions ($20 per month) available. The paid version can use more GPT 3.5 and GPT 4. From the user experience, the functionality of the free version is also very powerful. Currently, the free version can use 100 GPT 3.5 Prompts and 10 GPT 4 Prompts per month. Users can also use the OpenAI API Key to calculate fees at cost.
Cursor converts the natural language input by users into code. In terms of code saving, Cursor provides the Local Mode. When the user selects this mode, the code will only be saved on the user’s computer. When it is not selected, the code will be cached to improve Cursor.
Cursor Programming Tutorial
Currently, Cursor can support three systems: Windows, Linux, and Mac. After downloading and installing, you need to register for use. The interface after logging in is as follows:
Currently, the programs that can be written include JavaScript, Python, and C++, which can be used to create new files in the Project on the right. On the right side of the page, you can choose whether to use GPT 3.5 or GPT 4. Two main functions are mostly used:
Ctrl+K, users enter text in the interface and directly generate code. The code can be copied and run in other IDEs, or you can choose Run to run directly, but you need to first install the corresponding program in Cursor.
Ctrl+L, users select the code and actively asks questions to receive an explanation. The answer to the question will be displayed on the right side and will not appear directly in the code.
We tried two types of code, JavaScript, and Python respectively. In JavaScript, we requested to create a webpage with SetmyAI.com as the content and add Start and Exit buttons below. The code provided by Cursor is as follows:
The effect of the code displayed in the browser is:
Afterwards, we tested the Python code and requested the program to obtain yesterday’s closing price of the APP from YAHOO Finance. Cursor provided the following code:
In Jupyter Notebook, running the code yields the following results:
From the actual effect, Cursor has a very friendly user experience and fast code generation speed. If you have any questions about the code, you can select the corresponding code and type Ctrl+L to generate an explanation of the code:
Summary
Cursor is easy to get started, has fast code generation speed, and can also support functions such as bracket matching, automatic indentation, and error correction. Users with programming needs are worth giving it a try. For the 100 Prompts given in the free version, you can view the usage quantity in Setting and allocate them reasonably.
Website: