简体   繁体   中英

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)

The only changes to my _vimrc are to set line numbers, lines, columns, and enable syntax.

Everytime I edit a file with vim, save it and close it ( :wq ), a new _viminfo file is created in that files directory.

Also, the backup *.*~ files and .swp files persist, and arn't cleared upon saving. Running Windows 7 enterprise.

This really clutters everything - and is a pain trying to open a file for which a .swp file exists.. Help?

disable viminfo file:

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:

  • 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. For the last two, when $HOME is not set, "$VIM_viminfo" is used. When $VIM is also not set, "c:_viminfo" is used. For OS/2 "$VIM/.viminfo" is used when $HOME is not set and $VIM is set.

It appears as if your %HOME% variable (or the %HOMEDRIVE%%HOMEPATH% ) isn't properly set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM