TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Timesaving Hotkey for Working with LLMs for Software Development

4 点作者 eigenvalue8 个月前
I found myself typing the same string over and over again and finally decided it was time to do something about it. This is for Windows (I mostly develop within WSL Ubuntu inside Windows 11), but I&#x27;m sure it&#x27;s not hard to do something similar on Mac or Linux desktops.<p>Basically, you install AutoHotKey 2.0 from here:<p><a href="https:&#x2F;&#x2F;www.autohotkey.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.autohotkey.com&#x2F;</a><p>Then create a file somewhere called CtrlCapsLockPaste.ahk with the contents:<p><pre><code> #Requires AutoHotkey v2.0 ^CapsLock:: { Send &quot;+{Enter}&quot; Send &quot;I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality!&quot; Send &quot;+{Enter}&quot; } </code></pre> Then you can also copy this .ahk file to your Startup folder:<p><pre><code> C:\Users\&lt;your_name&gt;\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup </code></pre> Then, whenever you ask something to Claude or ChatGPT about revising a function or method or something like that, you can quickly press Ctrl + CapsLock and it will add that message.<p>I find that when I don&#x27;t use this sort of wording constantly, they give me annoyingly incomplete code with tons of placeholders, or simplify my existing code by focusing just on the part they are trying to revise. This can be super annoying because you might not realize at first that they simplified your code (I&#x27;ve started always checking the line count before and after). This command greatly reduces that tendency with Claude3.5 Sonnet and ChatGPT 4o, and if it takes half a second to add, you&#x27;re more likely to just do it out of habit and avoid wasted time and wasted Claude inference requests, which are annoyingly limited per period of time.

2 条评论

KetoManx648 个月前
On Linux this can be accomplished using a hot-string with Espanso (<a href="https:&#x2F;&#x2F;espanso.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;espanso.org&#x2F;</a>), install Espanso and then add the string to your match.yml file: ``` - trigger: reviseme replace: &quot;I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality!&quot; ```
eigenvalue8 个月前
Apparently it&#x27;s pretty easy to do on those other platforms. For Mac:<p>Using BetterTouchTool:<p><pre><code> Install BetterTouchTool from bettertouchtool.net. Open BetterTouchTool and go to the “Keyboard” section. Add a new keyboard shortcut, for example, Ctrl + CapsLock. Set the action to &quot;Insert&#x2F;Paste Custom Text.&quot; Enter your custom message: I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality! </code></pre> For BetterTouchTool, there&#x27;s an option in the app to start at login.<p>Using Hammerspoon:<p><pre><code> Install Hammerspoon from hammerspoon.org. Create a configuration file (~&#x2F;.hammerspoon&#x2F;init.lua) with this content: </code></pre> hs.hotkey.bind({&quot;ctrl&quot;}, &quot;capslock&quot;, function() hs.eventtap.keyStrokes(&quot;I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality!&quot;) end)<p>Reload Hammerspoon by clicking on its menu icon and choosing &quot;Reload Config.&quot;<p>For Hammerspoon, you can add it to &quot;Login Items&quot; in System Preferences &gt; Users &amp; Groups &gt; Login Items.