gpt4 book ai didi

vim - 如何阻止 Vim 创建 *-e 文件

转载 作者:行者123 更新时间:2023-12-04 19:30:20 27 4
gpt4 key购买 nike

最近我的 Vim 一直在我的文件夹里乱扔以 -e 结尾的额外文件。 .例如,如果我正在编辑一个名为 test.php 的文件,有时(但并非总是如此!)我会得到另一个名为 test.php-e 的文件。以及。

我不知道是什么原因造成的,但这很烦人。据我所知,我最近没有改变任何东西。备份文件都在我的 ~/.vim/backups 中目录,所以我不确定这些东西是从哪里来的。想法?

最佳答案

set nobackup

或将备份目录设置为/tmp 之类的内容并不时清除。

来自 VIM 文档 (:help nobackup)
'backup' 'bk'       boolean (default off)
global
{not in Vi}
Make a backup before overwriting a file. Leave it around after the
file has been successfully written. If you do not want to keep the
backup file, but you do want a backup while the file is being
written, reset this option and set the 'writebackup' option (this is
the default). If you do not want a backup file at all reset both
options (use this if your file system is almost full). See the
|backup-table| for more explanations.
When the 'backupskip' pattern matches, a backup is not made anyway.
When 'patchmode' is set, the backup may be renamed to become the
oldest version of a file.
NOTE: This option is reset when 'compatible' is set.

关于vim - 如何阻止 Vim 创建 *-e 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15226548/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com