I am using Vim on windows. Any time I edited a file, Vim is created temporary files. When I created a file,


Vim is creating files like these:


Are these files Vim temporary files? If so, how do to stop it?


1 Answer 1


I think these are the vim backup files.

This should turn them off:

set nobackup

There will still be one while vim is actually writing the file (e.g, during the :w command; use set nowritebackup to disable).

There is also a swap file, another temporary file. That exists only when vim is running; its purpose is to recover unsaved changes if e.g., vim crashes. To disable this as well, set noswapfile. You can also put these in a different directory via the directory setting.

Not the answer you're looking for? Browse other questions tagged or ask your own question.