aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/vimrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 9b40894d..f3413d1e 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -43,6 +43,9 @@ if empty($SUDO_USER)
if !isdirectory($HOME . "/.vim/backup")
call mkdir($HOME . "/.vim/backup", "p", 0700)
endif
+ if has("autocmd")
+ autocmd BufWritePre * let &backupext = '.' . strftime("%Y-%m-%d_%H:%M:%S") . '.bak'
+ endif
else
set nobackup
set nowritebackup