I'm a beginner at Vim. I have downloaded the latest version of Vim on my Windows 7 system.I attempted to open and save an existing .txt file after making a minor change and got some interesting behavior which I would like help understanding.I have a file named Python_Link.txt on my desktop. I opened Vim and typed the following on Normal Mode::e C:\Users\Joe\Desktop\Python_Link.txtWhen I press Enter the file opens as I would expect in Vim.I then type:oin Normal Mode. This works as expected. I then type in some lines of text. I then press:escI'm back in Normal Mode. I then enter::wI then manually close Vim by terminating it by clicking on the X in the upper right hand corner of the window.When I check back on my desktop I now have 3 files instead of the one I originally started with. The one I started with appears unchanged when I open it in Windows Notepad. When I open one of the other files I see the changes I made in Vim exactly as I made them. The 3rd file looks like it contains Binary data, but the first 3 characters are VimWhen I open a Console and navigate to the desktop and use thedircommand I see the following 3 files listed:Python_Link.txtPython_Link.txt~.Python_Link.txt.un~The .txt~ file contains my original data.The .txt file contains the original data and the changes I added in Vim.The .un~ file contains the data which looks like Binary data.I was under the impression that the :w Command in Normal Mode in Vim merely saved the file. That's what I was trying to do. Can someone please explain what is happening? Thanks in advance.
Understanding File Saving Behavior in Windows
normal mode;save
The .txt~ file is a standard vim backup file. To stop vim from creating one, add the following to your _vimrc:set nobackupset nowritebackupAccording to this question on SO, the .un~ is an undo file. It can be turned off by the following command in your _vimrc:set noundofile