import { op } from "https://deno.land/x/ddc_vim@v4.3.0/deps.ts";
const { backupskip } = op;
A list of file patterns. When one of the patterns matches with the
name of the file which is written, no backup file is created. Both
the specified file name and the full path name of the file are used.
The pattern is used like with :autocmd
, see autocmd-patterns
.
Watch out for special characters, see option-backslash
.
When $TMPDIR, $TMP or $TEMP is not defined, it is not used for the
default value. "/tmp/*" is only used for Unix.
WARNING: Not having a backup file means that when Vim fails to write your buffer correctly and then, for whatever reason, Vim exits, you lose both the original file and what you were writing. Only disable backups if you don't care about losing the file.
Note that environment variables are not expanded. If you want to use $HOME you must expand it explicitly, e.g.:
:let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*'
Note that the default also makes sure that "crontab -e" works (when a
backup would be made by renaming the original file crontab won't see
the newly created file). Also see 'backupcopy' and crontab
.
(default: "$TMPDIR/,$TMP/,$TEMP/" Unix: "/tmp/,$TMPDIR/,$TMP/,$TEMP/" Mac: "/private/tmp/,$TMPDIR/,$TMP/,$TEMP/*")