Add a timestamp to vim backup files
This commit is contained in:
parent
15dce64546
commit
a4b155c6a4
7
vimrc
7
vimrc
|
@ -193,10 +193,13 @@ endif
|
||||||
set t_ti= t_te=
|
set t_ti= t_te=
|
||||||
" keep more context when scrolling off the end of a buffer
|
" keep more context when scrolling off the end of a buffer
|
||||||
set scrolloff=3
|
set scrolloff=3
|
||||||
|
|
||||||
" Store temporary files in a central spot
|
" Store temporary files in a central spot
|
||||||
set backup
|
set backup
|
||||||
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
|
set directory=$HOME/tmp " For swap files
|
||||||
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
|
set backupdir=$HOME/tmp
|
||||||
|
:au BufWritePre * let &bex = '.' . strftime("%Y-%m-%d-%T") . '.bak'
|
||||||
|
|
||||||
" allow backspacing over everything in insert mode
|
" allow backspacing over everything in insert mode
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
" display incomplete commands
|
" display incomplete commands
|
||||||
|
|
Loading…
Reference in New Issue
Block a user