tutorials

cursor tricks that actually save time

cursortipsproductivitytools

stop using cursor like a regular editor

most people install cursor and use it exactly like vscode with a chat window. that works, but you are leaving a lot on the table. here are the things that actually make a difference once you know them.

talk to your whole codebase

hit cmd+enter (or ctrl+enter) in the chat and cursor indexes your entire project. now when you ask "where does the user authentication happen" it actually knows. it reads your files, understands your structure, and gives answers based on your actual code.

this is way better than pasting code snippets into a separate chat window.

be specific in your prompts

bad: "make this better"
good: "refactor this function to handle the case where the user has no email address, and add a loading state to the button"

the more specific you are about what you want, the less time you spend going back and forth. say exactly what should change and what the result should look like.

use the inline edit

select some code, hit cmd+k, and describe what you want to change. this is faster than the chat for small edits. "convert this to async/await" or "add error handling here" or "make this work with the new api response format."

let it write tests

this one is underrated. select a function, open the chat, and say "write tests for this function." cursor knows the testing framework you are using and generates tests that actually match your code. you will still need to review them but it saves a ton of setup time.

the composer for bigger changes

when you need to change multiple files at once, use the composer (cmd+i). describe what you want at a higher level: "add a dark mode toggle that saves the preference to local storage and applies it across all pages." it will edit multiple files in one go and show you the diff before applying.

rules file

create a .cursorrules file in your project root. put your preferences in there: "use typescript. use tailwind for styling. prefer server components. keep functions small." cursor reads this on every prompt and follows your style without you having to repeat yourself.

when cursor gets it wrong

it will get things wrong sometimes. when that happens:

  • undo (cmd+z works on ai edits too)
  • be more specific about what went wrong
  • show it the error message
  • break the task into smaller pieces

do not let it go in circles. if the same approach fails twice, try a different prompt or do it manually. knowing when to stop prompting and just write the code yourself is an important skill too.

links

comments (0)

log in to comment

no comments yet