vim备份文件
好吧,我很尴尬地承认我在 Vim 中备份文件时遇到了麻烦。这是我的 .vimrc 中的内容:
set backup
set backupdir=~/backup/
set dir=~/backup/
它位于文件的最底部。目前还没有生成 .bak 或 .swp 文件。我已经验证该目录存在。有人对此有什么想法吗?
谢谢...
Ok, I'm embarrassed to admit I'm having trouble with backup files in Vim. Here's what's in my .vimrc:
set backup
set backupdir=~/backup/
set dir=~/backup/
And it's at the very bottom of the file. At the moment no .bak or .swp files are ever generated. I've verified that the directory exists. anyone have any ideas that I can pursue on this?
thanks...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先我会检查 init 是否达到了这一点。例如,启动
vim
后,我会发出以下一些问题:如果上述任何内容与您的设置不符,那么您的
.vimrc
,并且 init 因该错误而退出。当然,您可以检查
~/backup
目录是否具有写入权限...HTH
First of all I'd check if the init gets to that point. E.g. after starting
vim
, I'd issue some of these:If any of the above doesn't correspond to your settings then some error(s) should be in your
.vimrc
, and the init exits on that error.Of course you can check if the
~/backup
dir has write access...HTH