Vim 8.0.69不尊重BackupDir和目录设置

时间:2017-01-06 15:08:19

标签: vim

是否有其他人在Windows上遇到与最新版本的VIM有关的问题,而不是backupdir中的directory_vimrc设置?我目前在Windows 10上运行并且在WinXP上看到了这种行为,但还没有尝试过Win10。我知道我的_vimrc已被使用,因为其他设置正在生效。我已经尝试了一些建议,并已发布到vim-use论坛:VIM 8.0.69 not honoring "backupdir" and "directory",但尚未找到解决方案。备份和交换文件出现在已编辑文件的位置。

这是我的_vimrc文件中带有注释的有趣位:

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

" Create the folder if it does not exists
if !isdirectory("c:\\temp\\vim_backups")
    call mkdir("c:\\temp\\vim_backups", "p")
endif   

" This worked in vim74, but not 8.0.69
set backupdir=c:\temp\vim_backups,.      " Also tried bdir=...
set directory=c:\temp\vim_backups,.      " and dir=...


" Tried this as well, to no avail
"set nobackup
"set nowritebackup

set lines=50
set columns=180
set nowrap
set number
set tabstop=2
set shiftwidth=2
set expandtab
set autoindent
set ic"ignore case

" Other non-interesting bits removed

我可能会回滚到vim74,这对我来说是可靠的。直到现在。

**编辑1 **

添加了创建vim_backup文件夹的脚本部分。

**编辑2 **

我的不好,我认为我看到的是undo文件。我遇到了一篇讨论undodir设置的帖子。我现在意识到我看到的粪便实际上是undo个文件。事情似乎正如预期的那样发挥作用。对不起,感到困惑。

0 个答案:

没有答案