I'm new to vim but would like to get to grips with it. I'm having difficulty understanding one thing.
Let's say bring up a terminal and go to the Desktop (for example)
Then I create a file called "test"Code:cd Desktop
I write some text in the file then save it by typingCode:vim test
in command mode. Now I'm back in the desktop directory. I type "ls" and sure enough my test file is sitting happily there. So I open it again using the following commandCode::wq
And I get this messageCode:vim test
I did a bit of googling and learnt a bit about recovery, but to be honest most of it went over my head. So what is exactly happening here? Pressing enter just takes me to the file I want, is it ok to keep doing that? Is there a way to stop getting this message?Code:E325: ATTENTION Found a swap file by the name ".test.swp" owned by: root dated: file name: ~root/Desktop/test modified: YES user name: root host name: process ID: While opening file "test" (1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r test" to recover the changes (see ":help recovery"). If you did this already, delete the swap file ".test.swp" to avoid this message. "test" [New File] Press ENTER or type command to continue
Thanks as always