3 ms·
I just found that the Vim manual recommends, right in the doc for backupext, the use of the BufWritePre hook instead, so: :au BufWritePre * let &backupext=("
by kazinator 5y ago
I just found that the Vim manual recommends, right in the doc for backupext, the use of the BufWritePre hook instead, so:
:au BufWritePre * let &backupext=("." . strftime("%y-%m-%d.%H:%M:%S"))
This has the right effect that every time you save with :w, a new backup is made of the previous contents.