0

Possible Duplicate:
Why does Vim save files with a ~ extension?

I have a simple question that I'm unable to find the answer to here or in the Vim help manual.

When I edit a text file, a filename.txt~ file is created in the folder. I understood this to be the buffer's SWAP file to be edited as I was working on it in Vim.

My question is why this file remains after I write the file and quit with :wq? Is it to preserve the undo functionality next time I edit it, or something like that? If so, is there a way to turn that off?

I'm very new to Vim, and the .vimrc is still the one provided in the windows binary installer. I haven't edited it yet. Would this be an option in there?

Thanks in advance, Scott

Community
  • 1
  • 1
svh160
  • 77
  • 1
  • 6
  • 1
    Those are backup files. `:help backup` The buffer swap files are `.filename.swp` – Michael Berkowski Jan 24 '13 at 21:58
  • You could use `:set nobackup` in your `.vimrc` to remove them, or change where Vim stores them with `backupdir`. – Daan Bakker Jan 24 '13 at 22:00
  • @Michael Berkowski, thanks for that link and the answer. It was an exact duplicate, and I've flagged this question. Sorry about that, not sure why it didn't show in my search. – svh160 Jan 25 '13 at 02:54

0 Answers0