How do you enable persistent undo across sessions?
Answer
set undofile undodir=~/.vim/undo//
Explanation
Enable undofile and set undodir to persist undo history to disk. You can undo changes even after closing and reopening a file.
set undofile undodir=~/.vim/undo//
Enable undofile and set undodir to persist undo history to disk. You can undo changes even after closing and reopening a file.