if has("persistent_undo")
    set undodir='$HOME/.vim/undotree'
    set undofile
endif

if has("persistent_undo")
    set undodir=$HOME/.vim/undotree
    set undofile
endif

Fix leaving history files all over the place
[vim] Fix leaving history files all over the place

solarnz/dotfiles