Moved vim temp files to ~/.cache
authorJames Bunton <jamesbunton@delx.net.au>
Fri, 14 Jun 2019 11:50:33 +0000 (21:50 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Fri, 14 Jun 2019 11:53:50 +0000 (21:53 +1000)
.vimrc

diff --git a/.vimrc b/.vimrc
index 816546d..4d4f76f 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -3,10 +3,12 @@ set backspace=indent,eol,start
 
 
 set backup
-set backupdir=~/tmp/vimbak
 set backupcopy=yes
-silent exec "!mkdir -p ~/tmp/vimbak"
-silent exec "!find ~/tmp/vimbak -type f -mtime +3 -delete"
+set directory=~/.cache/vim/swap//
+set backupdir=~/.cache/vim/backup//
+set undodir=~/.cache/vim/undo//
+silent exec "!mkdir -p ~/.cache/vim/{swap,backup,undo}/"
+silent exec '!find ~/.cache/vim/ -type f -mtime +3 -delete'
 
 
 syntax on