On 12/3/2022 6:42 AM, Salman Halim wrote:
On Thu, Dec 1, 2022 at 5:04 PM Salman Halim <salmanha...@gmail.com> wrote:


    On Thu, Dec 1, 2022, 15:32 Owajigbanam Ogbuluijah
    <xigba...@gmail.com> wrote:

        Does *:h changes*help?


    I hadn't thought to look at that. That's interesting. I suspect
    I'm going to just do the diff stuff similarly to Mundo (as
    suggested by Christian) or Gundo because I need an exact list of
    lines that were added or changed, but want to skip any that were
    deleted.


[...]

Basically, I can't check the entire file after every save. I need to have some way of restricting the diff regions.

1) Vim can diff contents of buffers that are not associated with physical files. On detecting a save, from the change list get the lines of interest in the previous and current version; then appendingly-yank the regions of interest in the current buffer and likewise appendingly-yank the corresponding regions in the saved file; and then open a new buffer that compares the yanked stuff. (I don't mean do these steps manually, but via a script.)

2) I came late to this thread and do not know if comparing an entire file but restricting the display via folds meets your needs. If so, one could detect a save command and write a script that opens a new buffer that visually compares the previous and current versions with unchanged regions folded and the ability to jump to changes via ]c and [c.

--Suresh

--
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/9abf9794-77aa-bb96-37c3-71bce25a4635%40yahoo.com.

Reply via email to