Skip to main content
2 of 6
Remove some duplicate text that's not required (making the question shorted & easier to understand).

Vim VM-created .swp file exists and Vim ignores it

I have a file open in Vim inside a Linux virtual machine guest and I then try to open the file on the Windows host, and I do not get that warning that goes "Swap file blah.swp already exists!" I want that warning because that is the only way I can find out I am already editing the file somewhere else, like in this case, in the VM!

It doesn't matter whether I edit the file on Windows first and then use the VM, or I edit the file in the Linux VM and then open the file in Vim on Windows, it's the same result, no warning. In both cases vim creates a .swo file silently. However, if the file is opened a second time on the VM while being already open on the VM, I do get the warning, and same thing on Windows.

Reading :help recovery does not give anything informative.