这可能更适合 apple.SE,但无论如何,这是我的问题。
使用 MacVim 编辑带有颜色标签的文件时,保存文件时颜色标签会消失。我感觉这是因为 vim 使用了一个临时文件(缓冲区),并用缓冲区替换了原始文件……但如果我错了,请纠正我。
这是正常现象吗?这是一个我应该报告的错误吗?
答案1
在您的/中包含set nowritebackup
和。set nobackup
.vimrc
.gvimrc
:help writebackup
'writebackup' 'wb' boolean (default on with |+writebackup| feature, off
otherwise)
global
{not in Vi}
Make a backup before overwriting a file. The backup is removed after
the file was successfully written, unless the 'backup' option is
also on. Reset this option if your file system is almost full. See
|backup-table| for another explanation.
When the 'backupskip' pattern matches, a backup is not made anyway.
NOTE: This option is set to the default value when 'compatible' is
set.