News for hackers. Stuff that matters.
Re:Resolving the Great Undo-Redo Quandary by lelanthran on Friday November 11, 2022 @09:41AM (#33561368)
Vim stores all deleted text automatically, up to a max of 10, I think.

Probably very possible to extend that with some advanced vimscripting.

Re:Resolving the Great Undo-Redo Quandary by cpcallen on Friday November 11, 2022 @09:44AM (#33561397)
In this thread: people discussing all the excellent features they wish their text editor had that emacs (and/or vim) has had for literally decades.
Re:Resolving the Great Undo-Redo Quandary by JackFr on Friday November 11, 2022 @10:00AM (#33561600)
And/or JetBrains.

Makes me wonder honestly what tool in widespread use doesn’t have this? Notepad?

Re:Resolving the Great Undo-Redo Quandary by nouveaux on Friday November 11, 2022 @09:48AM (#33561465)
Vim supports practically unlimited undo with branching history. You can visualize it and hop to any undo with a plugin.

https://github.com/simnalamburt/vim-mundo

Re:Resolving the Great Undo-Redo Quandary by lelanthran on Friday November 11, 2022 @10:34AM (#33562070)
Yes, but GP wanted something that would just keep all deleted text.

Sort of, anytime you delete something, that text gets stored somewhere in case, 2 hours later, you realised you wanted it.

Re:Resolving the Great Undo-Redo Quandary by quag on Friday November 11, 2022 @11:23AM (#33562734)
Yes, vim’s “set undofile” will create a persistent undo file that stores all changes to the file indefinitely. You can undo changes made months ago over reboots. If you move the undo file between machines, you can undo on different computers.

Undoing a change from 2 hours ago in the same editing session is the trivial use case for undofile.

Re:Resolving the Great Undo-Redo Quandary by lelanthran on Friday November 11, 2022 @05:43PM (#33567853)
But undoing is not what the original commenter wanted.
Re:Resolving the Great Undo-Redo Quandary by quag on Saturday November 12, 2022 @05:57PM (#33578025)
When set undofile is combined with :earlier and :later being used in place of undo and redo I think vim behaves as the author describes.