
You’ve been coding for hours, yet your program isn’t running or providing useful error logs. Your eyes flit through lines of code trying to identify the source of your problem. The debugging process is arduous and the deadlines are catching up to you. If this has ever happened to you, or if you’re a beginner in programming, I have good news. Cursor is the first of its kind: an AI-assisted code editor crammed with time-saving features.
Cursor is a fork of Visual Studio Code, meaning you can import all of your extensions, themes, and keybindings in one click. With the Command K feature, users can edit and write code with the AI. This feature enables users to select a piece of code, click “Edit,” and describe how the code should be changed. Cursor AI then generates the necessary changes, streamlining the editing process.
Copilot ++ is Cursor’s built-in autocomplete feature. It can be enabled or disabled depending on your preferences. Copilot ++ is an enhanced version of Copilot, meaning it offers better mid-line completions as you type. It is a custom model trained specifically to give you the best predictions using enhanced grounding.
Cursor AI also offers users a quick and easy way to apply edits from the chat directly into your editor. The chat can always see the entirety of your file, so you can always ask it to comb through your work and search for errors with Command + Enter. To give it a block for context, you can specify with Command + Shift +L or “@.” @ symbols in Cursor AI allow you to show the model your work in Command + K. This is exceedingly helpful to generate code with a particular dependency.
The Docs feature of this AI assists the model in understanding libraries from a third party and can be accessed using Command + K or @LibraryName. Cursor can also scrape custom documentation (@Add) if you specify the prefix and entry point the URLs should fulfill. You can assign a name for these libraries to call using “@.”
Within the terminal, the AI offers auto-debug and a method of fixing lint errors. To fix a lint error, hover over it and click the “Fix” button. Cursor will respond with how to fix this error in its chat. Leaving the terminal once more, we can access the Notes feature. Notes help you identify unfamiliar variables and provide you with a clear definition of what they do.
One of my favorite features as a UI developer is its image capabilities. Images can act as prompts for the AI, but it is limited to GPT-4 at the time of writing. Clicking the “Image” button underneath the chat allows you to easily drag and drop images in. You can easily add dark mode using this feature, for a use case instance.
If you need a firmer hand on the AI itself, head over to the “More” tab beside the chat. What you put into the rules section is inserted into the context section of the chat. This enables you to set strict guidelines on the AI and control the way it codes. If your codebase is tricky, you can provide it with the necessary information to avoid issues.
As usual, the software mentioned in this article is free for download and is available on Windows, Linux, and Mac. The free version includes 50 free slow GPT-4 uses, 200 free GPT-3.5 uses a month, the AI-powered code editor, and private data controls. Other tiers are available to tailor your experience as needed.
If I had to recommend an alternative to Cursor AI, I would strongly recommend Sourcegraph’s Cody, as it is the only other assistant that I’ve tested that knows your codebase. Did I mention it cites its sources in chat?
Would you ever use this editor? What other ways do you leverage AI in your coding process?
In Plain English 🚀
Thank you for being a part of the In Plain English community! Before you go:
- Be sure to clap and follow the writer ️👏️️
- Follow us: X | LinkedIn | YouTube | Discord | Newsletter
- Visit our other platforms: CoFeed | Differ
- More content at PlainEnglish.io
Editing code with AI was originally published in Artificial Intelligence in Plain English on Medium, where people are continuing the conversation by highlighting and responding to this story.
* This article was originally published here
