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:
When I press Enter the file opens as I would expect in Vim.
I then type:
in Normal Mode. This works as expected. I then type in some lines of text. I then press:
I'm back in Normal Mode. I then enter:
I 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 "Vim"
When I open a Console and navigate to the desktop and use the
command I see the following 3 files listed:
Python_Link.txt Python_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.