September 2nd, 2024

Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet

Cursor is an AI-powered code editor that enhances software development by integrating with the Claude Sonnet 3.5 model, allowing users to generate code and reference various sources for context.

Read original articleLink Icon
Code Smarter, Not Harder: Developing with Cursor and Claude Sonnet

Cursor is a code editor designed to enhance the software development process by leveraging AI for code generation. It is based on the familiar layout of VSCode and integrates with the Claude Sonnet 3.5 model from Anthropic, which aids in writing code efficiently. Users can interact with the AI through keyboard shortcuts, such as CTRL/CMD + L to chat and CTRL/CMD + K to generate code based on prompts. Cursor allows referencing various sources for context, including files, code sections, web searches, and documentation, which improves the relevance of generated code. A notable feature in beta is the composer mode, enabling users to create multi-step interactions with the AI for more complex coding tasks. The author shares their experience of using Cursor to develop a Next.js application that visualizes stock market data, demonstrating the tool's capabilities in real-world scenarios. Overall, the author expresses enthusiasm for Cursor's potential to transform software development and looks forward to future enhancements.

- Cursor is an AI-powered code editor that enhances development efficiency.

- It integrates with the Claude Sonnet 3.5 model for code generation.

- Users can reference various sources for context to improve code accuracy.

- The composer mode allows for multi-step interactions with the AI for complex tasks.

- The author successfully created a Next.js app using Cursor, showcasing its practical applications.

Link Icon 15 comments
By @simonw - about 1 month
Something that's been amusing me about Cursor is that I feel a lot of the excitement about it isn't so much about Cursor, it's people realizing that LLMs have got REALLY good at writing code now. GPT-4 was good for the past year, but the latest models (especially Claude 3.5 Sonnet) are spectacular.

Those of us who've been copying and pasting LLM-generated code back and forth from ChatGPT and Claude.ai for the past year had figured this out already, so Cursor wasn't a huge surprise for us.

For a lot of people Cursor is the first time they've really appreciated how good this stuff has got - so it's getting a massive amount of buzz, much of which should really be credited to Claude 3.5 Sonnet.

(Cursor have done an excellent job designing editor features on top of that model and deserve credit for that, I'm just a bit tickled at some of the excitement which basically boils down to "Huh, LLMs can write good code now".)

By @brigadier132 - about 1 month
I've been using cursor a bit, I don't know if it's because what I'm doing is not frontend web development but the results have not been as insane as others claim. I really don't have any difficulty creating basic web layouts or forms so an AI assistant doing that for me is nice but it does not transform my work.
By @zb3 - about 1 month
So this cursor is a fork and not an extension? Could anyone tell me why? What was not possible to achieve when implementing these features as an extension?
By @djohnston - about 1 month
Damn. I was so excited to try Cursor and when I set it up all my plug-ins got screwed up and go to def no longer worked. I guess I’ll try again this weekend.

I really want to code with voice to text via LLM. Why am I typing any code with my hands these days?

By @samier-trellis - about 1 month
To be clear, the main advantages over GitHub Copilot are ability to add other files as context and being able to have multiple chats going, right?
By @perardi - about 1 month
I think I’m fully on board the Cursor hype train.

Mind you, I am coming on board from a very particular station: I am a UX designer and developer, and bouncing between Figma and our HTML/CSS/Templ template stack back and forth all day. So I am writing markup more so than code.

And after a few days of using Cursor, I’m very into it. Partly because the default color scheme and layout just feels better than any theme I’ve used in VSCode. But more so, I really like their approach to the actual UI design of the autocompletes and access to AI features. They’re making a lot of smart choices that make it easier to understand what the autocomplete is actually completing, and exposing contextual keyboard shortcuts to access more features.

It also seems to be better at picking up my UI patterns than VSCode. Maybe. I need to get some more time with it, but it really seems to pick up the typographic and spacing rhythms and patterns I’m building.

By @x3n0ph3n3 - about 1 month
I hate VSCode so much, that having to use a form of it is a non-starter for me.
By @jeffhwang - about 1 month
I generally prefer using vim (and have started using neovim recently). Does anyone know when/if Cursor will provide official support to plug-ins that allow me to us its functionality in neovim? I've tried VS Code a number of times, but even with vim-bindings, it doesn't feel as nice as pure vim.

I'm aware of open source alternatives like Avante.nvim [1]. I mean official support from the folks at Anysphere/Cursor, Codeium, Poolside, etc.

[1] https://news.ycombinator.com/item?id=41353835

By @stefan_ - about 1 month
My first experience with Cursor: starting it from WSL doesn't work, went down a number of GitHub rabbit holes to fix that one. Then on every update it breaks the original "code" shortcut because it has it's path with both "code" and "cursor" launchers in PATH; it ostensibly gives you the choice to register either or both, but I fail to see how that can work with this setup.

It's actually a nice tool but I'm getting a "you should be a unicorn to fork ~Chrome~ VS Code" vibe.

By @cloudking - about 1 month
UX is what sets Cursor apart, all the pieces it's built on already existed, they pulled them together in a coherent way that makes coding with LLMs easier.
By @_pdp_ - about 1 month
I’ve been using GitHub Copilot as my daily driver. It is now as indispensable as the Vim extension for VSCode. It doesn't write much new code for me and, frankly, it fails miserably at most tasks. However, it does a phenomenal job with auto-completion. So, while I still feel like I am in the driver's seat, it does help me achieve tremendously more by simply extending what I have already started.

But that should be no surprise. After all, LLMs simply complete the next token in a long sequence of text based on some probability outcome. A lot of the code is a sequence of patterns. So the LLM should be able to do well.

I feel that true coding agents are perhaps around the corner, but it seems to me that we are a couple of innovations away before this happens.

However, even with coding agents, there will be simply more people producing a lot more code (even non developers) which I believe will drive the demand for higher quality code or at least code that can be understood and proved by other humans. Thus, coding agents are just force-multipliers. Great developers will become greater. I wrote something about this here if you are interested: go.cbk.ai/divide. My $0.02.

By @trees101 - about 1 month
obligatory plug for aider: https://github.com/paul-gauthier/aider https://aider.chat/docs/usage.html

I run aider in a terminal, and separately review and manually code in VSCode. Usint the `--no-auto-commits` switch means that I can immediately view the diffs in the nice VSCode diff view and it's very easy to do hybrid manual and AI coding. There are plenty of handy settings (see /help), for example you can /ask questions about your code.

`aider --no-auto-commits --cache-prompts --no-stream --cache-keepalive-pings 6 --no-suggest-shell-commands`