Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddu_vim/deps.ts>op.backupext

Dark deno-powered UI framework for neovim/Vim
Go to Latest
variable op.backupext
import { op } from "https://deno.land/x/ddu_vim@v4.0.0/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: "_")

type

GlobalOption<string>