I have this in
" Keep undo history between sessions if has('persistent_undo') set undofile set undodir=~/.vim_undo set undolevels=2000 endif
but, after switching laptops, I noticed the persistent undo feature wasn’t working.
The problem was that the
~/.vim_undo folder didn’t exist which silently
prevents the feature working.
create this automatically in
if you like.