vim: create undo_dir when missing

pull/6/head
bretello 2022-03-25 08:33:47 +01:00
parent 78ee86c14a
commit 7005372b5a
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
au BufRead,BufNewFile rules.v[46] *.rules setlocal filetype=iptables
if has('persistent_undo')
set undodir=$HOME/.vim/undo
let undo_dir=$HOME . "/.vim/undo"
if !isdirectory(undo_dir)
call mkdir(undo_dir , "p", 0o700)
endif
let &undodir=undo_dir
set undofile
endif