12 ms·
You can use “cut” instead of “delete” and clipboard with history tracking, for example Alfred on macOS. Then you cut, do some changes, and later on realize you
by xixixao 4y ago
You can use “cut” instead of “delete” and clipboard with history tracking, for example Alfred on macOS.
Then you cut, do some changes, and later on realize you wanted something from the cut code, bring out the clipboard history and fish out what you need.
- quartz 4y agoOh cool-- are you saying Alfred will let me override the delete key in the case of highlighted text so it always executes a cut instead?
- lyjackal 4y agoI think they’re just referring to a clipboard history offered by Alfred, not remapping the delete key
- tartoran 4y agoYes, but having thousands of snippets in a bucket can be quite confusing too, where do the pieces go back and so on. For this reason I comment out code then keep it until I’m sure I no longer need it. This works in sessions, and do the final delete, clean up etc at the end of the session before committing the changes to the repo. I see devs keeping commented out code in repos but that adds too much noise, makes the code a real mess..
- chrisshroba 4y agoMaccy is a great free and open source clipboard history tool with a nice interface (Alfred requires the power pack purchase for this feature)
- jorams 4y agoEmacs does this by default. Anything you delete ends up in the "kill ring", and you can cycle through that when pasting ("yanking") something. Packages like Consult[1] provide version of the yank-pop command that, instead of cycling through the kill ring, make it searchable. [1]: https://github.com/minad/consult https://github.com/minad/consult