Auto-create undodir if it doesn't exist

This is required for undo to work across restarts
This commit is contained in:
2026-06-09 18:57:16 +00:00
parent e6e62a375c
commit 60531ed270

View File

@@ -35,6 +35,9 @@ if exists("+undofile")
" Enable the persistent undo file(s)
set undodir=~/.vim/undo
set undofile
if !isdirectory(expand(&undodir))
call mkdir(expand(&undodir), "p")
endif
endif
set switchbuf+=usetab " Switch to existing tab; open a new tab for the new buf