A First Look At The Cursor Editor
A First Look At The Cursor Editor
Cursor is derived from VS Code, so in theory most VS Code settings can be imported and reused. If you normally develop with VS Code, migration should be convenient.
In practice, not every extension migrates perfectly. At least in my Windows environment, the WSL extension could not start properly under Cursor at that time. Still, I wanted to try Cursor and see whether it was as strong as people said.
I found a small C++ Gomoku game and used it to test what Cursor could do. The following experiments were done without selecting any code. I opened the chat window with Ctrl-L and gave natural-language tasks.
Task 1: Add Human Versus AI Mode
The original program supported only two human players. I asked Cursor to add AI support:
This is a Gomoku program. Add human-versus-computer logic, and support alpha-beta pruning.
Cursor understood the program structure and inserted a reasonable framework for human-versus-AI play. The generated code was not complete, and I still needed to fill in key details, but the direction was mostly correct. I would estimate it reached about 70% of the required work.
Cursor also explained the main changes:
// scoring constants
const int FIVE = 100000;
const int LIVE_FOUR = 10000;
const int DEAD_FOUR = 1000;
const int LIVE_THREE = 1000;
const int DEAD_THREE = 100;
const int LIVE_TWO = 100;
const int DEAD_TWO = 10;
class Player {
public:
bool isAI;
Player(int _id, string _name, int _color, bool _isAI = false):
id(_id), name(_name), color(_color), isAI(_isAI) {}
};
It suggested adding:
- A board evaluation function
- An alpha-beta minimax search
- A way to mark a
Playeras AI - Changes to the
Gameloop so AI can make moves - A
getBestMove()function
The remaining work was also clearly listed:
- Implement the actual point-evaluation logic
- Generate legal candidate moves
- Evaluate the whole board
- Complete the minimizing branch
- Start with a simple evaluator and improve strength gradually
The important part is that Cursor did not merely paste code. It described where the program should change and what was still incomplete.
Task 2: Refactor Into An Object-Oriented Style
The original code was C++, but some parts were written in a C-like style. I asked:
Refactor the code into an object-oriented style.
Cursor proposed a Board class to manage board state and a Console class to isolate console operations. The class names were natural, and the responsibilities were reasonably separated.
Example:
class Console {
public:
static void moveTo(int x, int y) {
COORD coord{static_cast<SHORT>(x), static_cast<SHORT>(y)};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
static void showText(int x, int y, int color, const string& text) {
moveTo(x, y);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | color);
cout << text;
}
};
class Board {
private:
array<array<int, BOARD_SIZE>, BOARD_SIZE> cells{};
public:
Board() {
clear();
}
void clear() {
for (auto& row : cells) {
row.fill(0);
}
}
int getCell(int x, int y) const {
return cells[x / 4][y / 2];
}
void setCell(int x, int y, int value) {
cells[x / 4][y / 2] = value;
}
};
The refactor still needed manual review, but the result was much better than a blind mechanical rewrite. Cursor recognized that console rendering, board state, player state, and game logic were separate responsibilities.
What Felt Useful
Several things stood out in this early trial:
- Cursor can read the surrounding project without explicit code selection.
- It can propose a structural plan before code changes.
- It explains what it changed and what remains unfinished.
- For small programs, it can quickly reach a usable draft.
The limitation is also clear: generated code is not the final answer. For algorithms such as alpha-beta pruning, the framework may be right while the evaluation function still needs real design and testing. The developer must still understand the program and verify behavior.
Closing
This first trial made Cursor feel less like a code-completion tool and more like a project-aware assistant. It was especially useful for tasks that require reading the whole program and making changes in several places.
For real development, I would not blindly accept all generated code. But as a way to explore a codebase, draft a refactor, or build the first version of a feature, Cursor was already surprisingly effective.
Follow ZiCode on WeChat
If this post was useful, you can follow later updates on WeChat as well.
X / Twitter
Follow @ax2_zicode
Faster technical notes, short thoughts, and new-post alerts are posted on X.