Thursday, December 1, 2022

Re: List of changed lines

On Thu, Dec 1, 2022, 10:52 Christian Brabandt <cblists@256bit.org> wrote:

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

I looked at the code for Gundo. It does indeed go back to an earlier state using : earlier, grabs the entire buffet contents and then uses a Python diff library to generate a diff between the two versions. I might do something similar. Thank you for the confirmation that I wasn't missing something obvious. 

Salman

--
--
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/CANuxnEceBTYQP5%3DHC-8nRbU3Ex35enpfCVCER1v_6-f1-rL6xQ%40mail.gmail.com.

No comments: