import { op } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { backupext } = op;
String which is appended to a file name to make the name of the
backup file. The default is quite unusual, because this avoids
accidentally overwriting existing files with a backup file. You might
prefer using ".bak", but make sure that you don't have files with
".bak" that you want to keep.
Only normal file name characters can be used; "/\*?[|<>"
are illegal.
If you like to keep a lot of backups, you could use a BufWritePre autocommand to change 'backupext' just before writing the file to include a timestamp.
:au BufWritePre * let &bex = '-' .. strftime("%Y%b%d%X") .. '~'
Use 'backupdir' to put the backup in a different directory.
(default "~"
, for VMS: "_")