Search undo history

20 views
Skip to first unread message

Lifepillar

unread,
Mar 8, 2023, 8:37:56 AM3/8/23
to vim...@googlegroups.com
Is there a built-in way or a plugin to extend / to the undo history?

Use case: working on some code, I deleted a function a few hours ago,
and I wanted to reinstate it. Using :earlier/:later did the job, but
required a bit of trial and error.

Thanks,
Life.

Enan Ajmain

unread,
Mar 9, 2023, 3:57:48 AM3/9/23
to Lifepillar, vim...@googlegroups.com
On Wed, 8 Mar 2023 13:37:40 -0000 (UTC)
Lifepillar <lifep...@lifepillar.me> wrote:
> Is there a built-in way or a plugin to extend / to the undo history?
>
> Use case: working on some code, I deleted a function a few hours ago,
> and I wanted to reinstate it.

There isn't a built-in way. And for your example usecase, I think git
would be a better tool to handle it.

--
Enan

Markus Braun

unread,
Mar 9, 2023, 4:14:26 AM3/9/23
to vim...@googlegroups.com, lifep...@lifepillar.me
Possibly the Mundo plugin (https://github.com/simnalamburt/vim-mundo)
will help with this use case. This plugin visualizes the undo tree,
speeds up traversing the tree and supports searching in the changes.

Markus Braun

--
Any errors in spelling, tact or fact are transmission errors
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/tua334%2417oq%241%40ciao.gmane.io.
>
Reply all
Reply to author
Forward
0 new messages