mardi 24 mars 2015

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!" (The file is shared to the guest.) 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 Vim on Linux in 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. You could say the behavior is uniform then from Linux to Windows. In both cases Vim creates a .swo file silently, without complaining as it (I believe) should. 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 (for those who want to ask about my Vim settings).


Reading :help recovery does not give anything informative. Version is Vim 7.4 in both cases.



Aucun commentaire:

Enregistrer un commentaire