gVim creates and leaves strange tilde ~ files in Windows

Hey folks,

I have used gVim in Windows for many years but I have never found an answer to a very simple question I am going to ask you guys...

My question is if there is a way to eliminate the creation of those ~ files that gVim creates in Windows. If you have ever used gVim in Windows you probably noticed that gVim creates a file with the same name as the one you were editing except tacks a tilde (sp?) "~" to the end...

Meaning if I were to edit the file "example.txt" gVim creates a file "example.txt~" and puts it in the same directory (as the original). I would not mind this if the file were deleted after I close gVim, but the file remains even after I close gVim. (I can open these "tilde files" and the appear to be just like the originals.)

Anyone know how to prevent the file from being created or how to have gVim automatically delete it when the editing is done?

Thanks a million!

I tried setting

set nobackup

in the startup settings file "_vimrc" (Menu > Edit > Startup Settings) but I still get the tilde files!

Eureka! I THINK I got it...

I had to make sure the the line / setting:

set nobackup

was placed AFTER the lines

source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim

once I did that (and opened files,) file backups were no longer created.

I guess I could have answered my own question without posting here, but maybe this post will help some other gVim (in Windows) user out there.