From: martin f. krafft Date: Tue, 17 Sep 2019 06:05:50 +0000 (+0200) Subject: Write mail backups on write X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/8fb6f0240ccd43d5120dd60070a9de157442df83?hp=-c Write mail backups on write --- 8fb6f0240ccd43d5120dd60070a9de157442df83 diff --git a/.vim/after/ftplugin/mail.vim b/.vim/after/ftplugin/mail.vim index 053758e..8c59b11 100644 --- a/.vim/after/ftplugin/mail.vim +++ b/.vim/after/ftplugin/mail.vim @@ -192,3 +192,5 @@ fun! DelegateCompletion(next) return "\x10" endif endfun + +autocmd BufWritePost exe 'write ' . fnameescape((exists('$TMPDIR') ? expand('$TMPDIR') : '/tmp') . '/mail.backup.' . strftime('%Y-%m-%d-%H%M%S'))