I have persistent undo enabled for vim, is there someway I can inspect a directory's entire undo history? For example something like a list of files sorted by last change recorded.
My intention is to be able to remember what files I last worked on in a project (under a directory). I'm already using version control via git however in this case it's to determine state of files that have not yet been committed (a state of work in progress).
I see there is a undotree()
which states:
undotree() undotree() Return the current state of the undo tree in a dictionary with the following items:
I've tried calling :undotree
or eval undotree "/home/chris"
but it does not seem to succeed with anything relevant.
My intention is to be able to remember what files I last worked on in a project
then instead of tweaking the undo function maybe it would be easier to use a session?:h Session
When you leave vim you usemksession
to store your currently open files and layouts and when you get back to your directory you source the session file. There are even plugins which ease the use of sessions. Would that fit your need?ls -rt
. Otherwise, sessions paired with github.com/tpope/vim-obsession has been a good workflow for me.