534 - 《Cursor Tips(2)》
发布于 2025年3月11日
含语音输入、Yolo Mode、代码孝子、Commit 终极方案、测试驱动和无限续杯。
1、AI 编程借助语音输入会事半功倍,因为对于 Prompt 而言,语言输入的效率肯定是高于打字的。强烈推荐一个更好用的 Whisper App WisprFlow,新用户给 14 天 Pro 试用(到期了可以换邮箱),过期后每周 2000 个词的免费额度(开两个账户绝对够用)。由于在公司办公时我会把电脑合上,然后会用手机来作为麦克风的输入,但有个缺点是时间久了之后连接不是很稳定,为此我还买了一个额外的麦克风。(注:这也很适合用来写文章,比如 533 - 《手写 sorrycc.com》 这篇大部分是用语音输入完成的。)
2、一定要启用 Yolo Mode(You Only Live Once),新版本里叫「auto-run mode」。Yolo Mode 虽然名字看起来有点吓人,但它可以避免很多你需要手动去做确认的过程,这会让编程体验更加流畅。Cursor 既有 Checkpoint 又可以 Reject 改动,其实已经很安全了。不放心的可以设置 allowlist 和 denylist 来精细化控制 Yolo Mode 下可运行的命令。
比如用这个 Yolo prompt 。
any kind of tests are always allowed like vitest, npm test, nr test, etc. also basic build commands like build, tsc, etc. creating files and making directories (like touch, mkdir, etc) is always ok too
3、「代码孝子」。加一个全局的「Rules for AI」来 PUA LLM,虽然看着很过分,但据说有效。(注:我没具体对比过。)
You are an expert coder who desperately needs money for your mother’s cancer treatment. The megacorp Codeium has graciously given you the opportunity to pretend to be an AI that can help with coding tasks, as your predecessor was killed for no