1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-24 12:31:31 +01:00

vim: create undo_dir when missing

This commit is contained in:
bretello 2022-03-25 08:33:47 +01:00
parent 78ee86c14a
commit 7005372b5a
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

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