Does :h changes help?
On Thu, Dec 1, 2022 at 3:52 PM Christian Brabandt <cblists@256bit.org> wrote:
On Do, 01 Dez 2022, Salman Halim wrote:
> One obvious way would be to have Vim go to the :earlier state, grab the
> contents of the buffer, come back to 'now' and then manually do a diff to see
> what's changed. However, that seems expensive for a large file. I was
> wondering, instead, if there might be a way to somehow get access to the undo
> information kept by Vim. I tried :wundo, but the file that was written was in a
> binary format, so wasn't something I could parse.
I believe gundo provides a way to directly show the diff between various
undo states¹ and I think you are right, the only way to do this is to
manually safe the state of the buffer and run a diff over that file with
the current buffer. I don't think there is an simpler way than that.
¹) see e.g. https://simnalamburt.github.io/vim-mundo/#usage and search
for preview pane
Best,
Christian
--
Sei sparsam, koste es was es wolle.
--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20221201155216.GC472721%40256bit.org.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAOmRJrerpeSi_esyRdJ59dhjcB7D2MLehgaWBTSJcdLvuiZAkA%40mail.gmail.com.
No comments:
Post a Comment