[英]Vim inserting _viminfo files after every save
I just did a clean (re)install of Vim (Downloaded from vim.org/download.php , used the gvim73_46.exe installer. Version is 7.3 (patches 1-46) 我只是干净地(重新)安装了Vim(使用gvim73_46.exe安装程序从vim.org/download.php下载,版本为7.3(1-46补丁)。
The only changes to my _vimrc are to set line numbers, lines, columns, and enable syntax. 对_vimrc的唯一更改是设置行号,行,列和启用语法。
Everytime I edit a file with vim, save it and close it ( :wq
), a new _viminfo file is created in that files directory. 每次我用vim编辑文件时,保存并关闭( :wq
),就会在该文件目录中创建一个新的 _viminfo文件。
Also, the backup *.*~
files and .swp
files persist, and arn't cleared upon saving. 另外,备份的*.*~
文件和.swp
文件仍然存在,并且保存后不会清除。 Running Windows 7 enterprise. 运行Windows 7企业版。
This really clutters everything - and is a pain trying to open a file for which a .swp
file exists.. Help? 这确实使所有事情变得混乱-尝试打开存在.swp
文件的文件很痛苦。帮助?
disable viminfo file: 禁用viminfo文件:
set viminfo="NONE"
disable swap file: 禁用交换文件:
set noswf
disable backup : 禁用备份:
set nobk
set nowb
more details: 更多细节:
:h 'swf'
:h 'bk'
:h 'wb'
:h 'viminfo'
That's strange; 那很奇怪; the viminfo file should be written in your home directory, nowhere else: viminfo文件应该写在您的主目录中,除此之外:
- The default name of the viminfo file is "$HOME/.viminfo" for Unix and OS/2, "s:.viminfo" for Amiga, "$HOME_viminfo" for MS-DOS and Win32. 对于Unix和OS / 2,viminfo文件的默认名称是“ $ HOME / .viminfo”,对于Amiga是“ s:.viminfo”,对于MS-DOS和Win32是“ $ HOME_viminfo”。 For the last two, when $HOME is not set, "$VIM_viminfo" is used. 对于最后两个,当未设置$ HOME时,将使用“ $ VIM_viminfo”。 When $VIM is also not set, "c:_viminfo" is used. 如果也未设置$ VIM,则使用“ c:_viminfo”。 For OS/2 "$VIM/.viminfo" is used when $HOME is not set and $VIM is set. 对于OS / 2,当未设置$ HOME且已设置$ VIM时,将使用“ $ VIM / .viminfo”。
It appears as if your %HOME%
variable (or the %HOMEDRIVE%%HOMEPATH%
) isn't properly set. 似乎您的%HOME%
变量(或%HOMEDRIVE%%HOMEPATH%
)未正确设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.