I use gvim on windows and I want to know a way to disable the temp file(ending in ~) file creation. Also is there a problem if we do it?
It's not quite what you asked for, but something that I've found works well is to redirect the swap and backup files to a seperate, dedicated folder. That way, they're still there if I need them, but they're not cluttering up the folder I'm working in.
The _vimrc
file can be created in any of the following locations:
%HOMEPATH%\_vimrc
C:\Program Files (x86)\Vim\_vimrc
The following lines in the _vimrc
file put backup files into a temporary directory:
set backup
set dir=%TMP%
set backupdir=%TMP%
set directory=%TMP%
set noundofile
The last line prevents the proliferation of undo files.