Attempt to create vim tmp and undo folders at start

This commit is contained in:
David Thurstenson 2017-02-16 15:06:10 -06:00
parent 6e07992ae0
commit e395b46a4b
1 changed files with 2 additions and 0 deletions

2
.vimrc
View File

@ -24,6 +24,8 @@ set backspace=indent,eol,start
if has("vms") if has("vms")
set nobackup " do not keep a backup file, use versions instead set nobackup " do not keep a backup file, use versions instead
else else
" Attempt to create ~/.vim/tmp and ~/.vim/undo
silent !mkdir -p ~/.vim/{tmp,undo} > /dev/null 2>&1
set dir=~/.vim/tmp " Set the swapfile location elsewhere to reduce breadcrumbs. set dir=~/.vim/tmp " Set the swapfile location elsewhere to reduce breadcrumbs.
set backup " keep a backup file (restore to previous version) set backup " keep a backup file (restore to previous version)
set backupdir=~/.vim/tmp " keep backup (.swp) files in a specific directory instead of the same dir as the file being edited set backupdir=~/.vim/tmp " keep backup (.swp) files in a specific directory instead of the same dir as the file being edited