Skip to content
Browse files

Break up ~/.vim/tmp in a logical manner

Signed-off-by: Chris Larson <chris_larson@mentor.com>
  • Loading branch information...
1 parent dec91cb commit b634084eef35406df6b7e784bf6d522a705e8234 @kergoth committed Feb 28, 2011
Showing with 4 additions and 7 deletions.
  1. 0 tmp/backup/.placeholder
  2. 0 tmp/swap/.placeholder
  3. 0 tmp/undo/.placeholder
  4. +4 −7 vimrc
View
0 tmp/backup/.placeholder
No changes.
View
0 tmp/swap/.placeholder
No changes.
View
0 tmp/undo/.placeholder
No changes.
View
11 vimrc
@@ -472,18 +472,15 @@ set backup
set writebackup
" Rename the file to the backup when possible.
set backupcopy=auto
+
" Don't store all the backup and swap files in the current working dirctory.
-if has("win32")
- let &backupdir = './_vimtmp,' . $TEMP . ',c:/tmp,c:/temp'
-else
- let &backupdir = './.vimtmp,' . $HOME . '/.vim/tmp,/var/tmp,' . $TEMP
-endif
-let &directory = &backupdir
+set backupdir=~/.vim/tmp/backup
+set directory=~/.vim/tmp/swap
" Persistent undo
if has('persistent_undo')
set undofile
- let &undodir = &backupdir
+ set undodir=~/.vim/tmp/undo
endif
set pastetoggle=<Leader>P

0 comments on commit b634084

Please sign in to comment.
Something went wrong with that request. Please try again.