Features
Cursor is an AI-powered code editor that helps you build software faster.
Command K
Command K lets you edit and write code with the AI. To edit, try selecting some code, click "Edit," and describe how the code should be changed. To generate completely new code, just type Command K without selecting anything.
Tip: Editing with Command K works best with selections between 1 and 50 lines. Edits also see the lint errors in your selection, so you can say "fix."
Copilot++
Copilot++ is Cursor's native autocomplete feature. You can enable it on the bottom status bar. It's a more powerful version of Copilot that can suggest mid-line completions and entire diffs. It uses a custom model that was trained to predict the next edit in a codebase.
Chat
Chat lets you talk with an AI that sees your codebase. The chat can always see your current file and cursor, so you can ask it things like: "Is there a bug here?". You can add particular blocks of code to the context with Command+Shift+L or "@." You can chat with your entire codebase with Command+Enter.
@ Symbols
@ Symbols let you easily show code to the AI. Try typing "@" in Command+K or in in the chat to get a dropdown of all the files and code symbols in your folder. You can use this for generating code that has a particular dependency ("Use the same styles as @ErrorPopup") or for asking about a file ("What does @inlineDiffService.ts do.")
Codebase Answers
Codebase Answers let you ask the AI about your entire codebase. To use them, type Command+Enter in the chat or click the "with codebase" button in the input box. You can ask questions like "Where is the undo redo logic?" or "how do we handle auth tokens client side?."
Tip: Click into "Advanced" into increase the number of AI scans that run throughout your code.
Docs
This feature improves the AI's understanding of third-party libraries. To use docs, type @LibraryName in the chat or Command K. To have Cursor crawl custom documentation, type "@Add" in Command K or in the chat. You'll specify the start of the crawl and a prefix that all crawled URLs should obey.
Auto-Debug
Auto-debug is an agent for fixing errors in Cursor's terminal. To use it, click the blue "Auto-debug" button that shows up after a terminal error. When clicked, the AI will look through your files and enter a chain of thinking to try to fix the problem.
Fix Lints
Cursor helps you quickly fix lint errors. Just hover over any lint error and click the blue "Fix" button that shows up. An AI response will show up in the chat. Never squint at a gnarly Typescript or Rust error again!
Terminal Command K
This feature lets you write terminal commands in plain english. Just hit Command K, and the AI will see the contents of your terminal. You can use it to write sql commands, fill in argparse arguments, and parse jsons with jq.
Notes
AI Notes help you quickly understand unfamiliar variables and types. Hold shift to get a quick summary of the symbol under your cursor. Notes will use both the definition of the symbol and any references to get you up to speed.
Vision
You can use images to prompt the AI in Cursor. Just hit the image button under chat or drag into AI input box. This is especially helpful for iterating on web UIs. Image support is only available for GPT-4 for the time being.
Apply From Chat
This feature helps you quickly get code suggestions from chat into your editor. Just click the "Apply" button in the top right of a Chat codeblock. The AI will suggest a rewrite to the filename shown to the left of the codeblock, using Cursor's fast diffs.
Rules for AI
Rules for AI lets you specify style guidelines for the AI. If you click on the settings gear in the top right, anything you put in "Rules" will be inserted into the context window anytime you use the AI. You can use this for warning the AI of common gotchas in your codebase or for controlling its code style.