I realize "Why does Vim save files with a ~ extension?" was asked 10 years ago.
I tried using the following fix from that discussion, putting the following in my .vimrc file:
set nobackup "no backup files
set nowritebackup "only in case you don't want a backup file while editing
set noswapfile "no swap files
But it doesn't work. I'm still getting littered with ~
files and want to stop these files from being generated. Is there a way?
I think part of the problem is that the lines above were followed by some boilerplate code in the .vimrc file that undid my commands:
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file (restore to previous version)
if has('persistent_undo')
set undofile " keep an undo file (undo changes after closing)
endif
endif
I put my commands below this code and the backup files are no longer generated, but I'm still getting the undo files.