NB: if you want to specify a dir for it, you need to create it yourself, or it silently won't work. eg mkdir ~/.vim/undodir, then in .vimrc :set undodir=~/.vim/undodir
I also love the idea of undotree, with branches etc, but found it too confusing in practice. Could the UI be more git-like, I wonder?
As with many of Vim's questionable but ultimately effective
interface decisions, I have found 'chronological undo' to
alleviate all my undo-tree-related pains: Step through the undo tree sequentially with 'g+' and 'g-' until you've found what you're looking for.
Completely agree with this. I actually think vims undo tree might be the most useful feature in vim for me. You can basically use it as version control lite with automatic commits.
enable with :set undofile in .vimrc
NB: if you want to specify a dir for it, you need to create it yourself, or it silently won't work. eg mkdir ~/.vim/undodir, then in .vimrc :set undodir=~/.vim/undodir
I also love the idea of undotree, with branches etc, but found it too confusing in practice. Could the UI be more git-like, I wonder?