3 ms·
This is what I have in my ~/.vimrc: " https://vi.stackexchange.com/questions/6/how-can-i-use-the-undofile if !isdirectory($HOME."/.vim") call m
by pjungwir 4y ago
This is what I have in my ~/.vimrc:
" https://vi.stackexchange.com/questions/6/how-can-i-use-the-undofile
if !isdirectory($HOME."/.vim")
call mkdir($HOME."/.vim", "", 0770)
endif
if !isdirectory($HOME."/.vim/undo-dir")
call mkdir($HOME."/.vim/undo-dir", "", 0700)
endif
set undodir=~/.vim/undo-dir
set undofile
- kzrdude 4y agoThat's neat, and a missing part of my vimrc - making sure the directories I use exist. Since I use .cache and exclude those from backups, it's actually bit me. I've added this thanks to you: call mkdir($HOME . "/.cache/vim/", "p", 0o700) I think this avoids using the conditionals, by just using "p".