Introduction to Cursor
The official gitHub website
Cursor is a programmer assistance tool developed by OpenAI.
Main functions and features
- It retains the coding style of Idea, has a simple interface and supports a variety of plug-ins.
- Support Max, Linux, Windows systems
- Enter the requirements in the workspace, either in Chinese or English, and the corresponding requirement implementation code can be quickly generated.
- Select the code to analyze the code, interpret the code, and help understand the meaning of the code.
- Through CHAT with AI, code can be optimized and code quality improved.
- Currently only supports 100 uses a month
Item usage tutorial
Click to download, punch in the installation package, and install it to the appropriate path on your local computer.
When you open Cursor, you can see a concise page. The leftmost vertical column identifies the file directory, the middle is the code writing area, and the rightmost vertical column is the area where the user chats with the AI model.
In the leftmost column, find "+" to create a new file. The suffix name can be added according to personal circumstances, such as "demo.java". Of course, you can also not add the suffix name. Just adding the suffix name can trigger the code style of Idea, which will look more intuitive.
Enter Ctrl+k, and a box will appear. Enter the requirements described in natural language, that is, human language, in the box. After inputting, enter Enter to automatically generate the implementation code of the requirements.
The automatically and quickly generated code is as shown in the figure.
If the code segment is not clear, you can select the code block and enter Ctrl+L. AI can analyze the code block and give a code interpretation in natural language ( PS, since AI defaults to The output is in English, so when we ask, we can add "Please answer in Chinese" at the end) .
Of course, if you encounter a code segment that has problems interpreting in daily life, you can also use the magic keys (Ctrl + C and Ctrl + V) to paste the code into the Cursor code area, select the code block and enter Ctrl + k to let the AI interpret it. Select the code segment (it works well in actual testing!!)
scenes to be used
- Personal learning to help decipher complex code.
- Algorithm learning, AI models can quickly write algorithms that meet needs, and are also suitable for personal algorithm learning (a homework help for programmers!)
- Code optimization, using AI models, constantly chatting with AI to find better algorithm structures
Summarize
Although AI tools are improving day by day, for programmers, AI is always just a tool. The meaning of their existence is to help programmers better improve themselves and save personal time, but I still hope that everyone will not rely too much on AI tools. After all, Encountering difficulties and solving them is the process of honing one's thinking.