diff --git a/vim/vimrc b/vim/vimrc index 5b8bac8..3340943 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -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