Re:Resolving the Great Undo-Redo Quandary
by tartoran on Friday November 11, 2022 @09:59AM
(#33561594)
Yes, 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..
Re:Resolving the Great Undo-Redo Quandary
by chrisshroba on Friday November 11, 2022 @10:05AM
(#33561681)
Maccy is a great free and open source clipboard history tool with a nice interface (Alfred requires the power pack purchase for this feature)
Re:Resolving the Great Undo-Redo Quandary
by quartz on Friday November 11, 2022 @09:48AM
(#33561459)
Oh 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?
Re:Resolving the Great Undo-Redo Quandary
by lyjackal on Friday November 11, 2022 @09:50AM
(#33561480)
I think they’re just referring to a clipboard history offered by Alfred, not remapping the delete key
Re:Resolving the Great Undo-Redo Quandary
by jorams on Friday November 11, 2022 @03:14PM
(#33566193)
Emacs 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.
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.