Cursor editor
Cursor This is a new generation of auxiliary programming artifacts that cooperate with OpenAI and are based on GPT3 . It supports multiple file types, formatted text, multiple themes, multi-language syntax highlighting, shortcut key settings, code folding, bracket matching, automatic indentation and other functions. The most important thing is that it can help us generate code without using the Internet .
Cursor download
It can be downloaded directly from the official website: https://www.cursor.so/ , currently it supports mainstream operating systems such as Windows, macOS, and Linux.
Cursor Operation Guide
After downloading, double-click to install, I am the Windows version. The operation is very simple, you only need to remember two shortcut keys:
Windows platform:
Ctrl+K : Intelligently generate code
Ctrl+L: Ask about code meaning
Ctrl+A+ Ctrl+K : Code continuation and rewriting ability, tell him to help you continue or rewrite.
Next, we open a file, such as main.py, then press the shortcut key Ctrl+K , and enter the code you want to generate in the prompt box (such as generating 9 × \times× 9 multiplication table), press Enter.
Wait a few minutes... Generate the code as follows, click to run.
The code generated for this simple problem is next to nothing. Suppose we do not understand some code, refer to the following code
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# %matplotlib inline
from sklearn.ensemble import RandomForestClassifier #随机森林
from sklearn.model_selection import KFold #交叉验证
filename="data.csv"
raw=pd.read_csv(filename)
print(raw.shape)
print(raw.head(3))
You can select the code you want to understand. For example: print(raw.shape)
, then the shortcut key Ctrl+L , and press Enter, CHAT will give the following answer:
In addition to generating code, how about testing its AI painting ability? (You can draw a panda to see)
use problem
The answer part is in English, how to set it?
Sometimes our CHAT answers in English, how to set it to Chinese? Just type in MORE always output your answers in Chinese
.
always output your answers in Chinese
Cursor settings Chinese version
Click File -> Preferences -> Extensions: Install Chinese (simplified) Simplified Chinese language pack, then Ctrl + Shift + P search: configure display language, the installation is complete.
Summarize
Cursor can write some basic codes for you according to your own requirements, which can greatly improve work efficiency, and you can prostitute for nothing without having an openAI account and key. It can be regarded as a free version of Copilot. Its coding ability is not inferior to the latter at all, and it supports multiple programming languages. It is especially suitable for code novices, and its installation and use are relatively simple. However, the generated code is still not perfect and does not meet the requirements. We can optimize our expression and be clearer so as to meet our requirements.
reference link
https://zhuanlan.zhihu.com/p/617403958
https://blog.csdn.net/hj960511/article/details/129705740
https://www.zhihu.com/question/590152131