1

The :changes command listed the change history of current file. However when I work with multiple buffers, I want to list changes to all the buffers I opened in current vim-server, like the behavior of tags and jumplist. Is there such facility available?

  • I'm not sure this is exactly what you want, but this snippet should install a mapping triggered by the keys g:c. When you press it, it should populate the quickfix list with the changelists of all the existing buffers. It requires at least the patch 8.0.1514, for the getchangelist() function to be available. – user938271 Nov 20 '18 at 13:06
  • @user938271, this is really near what I want. It is better to have some adjustment. For example, only shows the file name instead of the full path, shows the current line content after the change location. It is more usable if the list can be sorted using timestamp instead of being sorted by buffer. But I guess currently vim don't provide the facility to add a timestamp for each change. – Eric Sun Nov 21 '18 at 2:22
1

No, if you're looking for a combined change list; unlike :jumps, changes are not global, but local to each buffer.

What you can do is iterate over all open buffers:

:bufdo changes
|improve this answer|||||
  • This command can only show the changes, but don't provide navigation command like g, and g;. Wondering if there is some plugin that can jump between all these changes – Eric Sun Nov 20 '18 at 11:42
  • I don't think so, because obtaining all changes via :changes is costly, and then would require parsing and merging, which is not easy to implement. – Ingo Karkat Nov 20 '18 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.