Tuesday, June 19, 2012

Re: vimdiff: displaying the total number of changes

On Monday, June 18, 2012 4:59:51 AM UTC-5, Jonathan Fudger wrote:
> Hi everyone,
>
> When diffing two files, I have been wondering if is it possible to display the total number of differences between the files (i.e. the number of ]c motions required to get to the end).
>
> Ideally I would like a statusline (or simply an echoed message) that says something like "This is difference N of M".
>
> I have been vimscripting for quite a few years now, but I have no idea how to do this, so any advice will be gratefully received!
>

I don't know of any built-in way. You could probably go to the top of the file and user :normal! ]c in a while loop, counting the number of times you do ]c until the cursor stops moving. There may be a better way, but since nobody else has chimed in...

--
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

No comments: