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:
parent
78ee86c14a
commit
7005372b5a
|
@ -75,7 +75,11 @@ au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
|
||||||
au BufRead,BufNewFile rules.v[46] *.rules setlocal filetype=iptables
|
au BufRead,BufNewFile rules.v[46] *.rules setlocal filetype=iptables
|
||||||
|
|
||||||
if has('persistent_undo')
|
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
|
set undofile
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user