Auto-create undodir if it doesn't exist
This is required for undo to work across restarts
This commit is contained in:
@@ -35,6 +35,9 @@ if exists("+undofile")
|
|||||||
" Enable the persistent undo file(s)
|
" Enable the persistent undo file(s)
|
||||||
set undodir=~/.vim/undo
|
set undodir=~/.vim/undo
|
||||||
set undofile
|
set undofile
|
||||||
|
if !isdirectory(expand(&undodir))
|
||||||
|
call mkdir(expand(&undodir), "p")
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set switchbuf+=usetab " Switch to existing tab; open a new tab for the new buf
|
set switchbuf+=usetab " Switch to existing tab; open a new tab for the new buf
|
||||||
|
|||||||
Reference in New Issue
Block a user