vim | extra files
Hey, when i edit a file, even when i write to it (
:w
), it gives me these extra files, what causes this and can i get rid of them optionally?
Thanks in advance.6 Replies
Those are backups of the previous version in case you accidentally lose something.
How you turn them off, I dunno.
they should also just go away once you close the file
unless something went wrong or you force-quit vim
i'm not sure if anything went wrong? here's an example. That file just stays there, and sometimes there's more like in the pic.
like dys says, if they're backups then i understand why they're there, but i feel that could clutter pretty easily eventually haha
It looks like you’re showing hidden files. In windows file explorer you go to View -> Show -> Hidden Files/Folders and uncheck it. Or System files and folders sometimes. If you’re on a different os , google how to hide Hidden files and folders
that is normal. what some editors do is to create the temporary file, so they can see if they can write into that location
and when you save the file, what happens is that the editor will swap the files and delete the old one
in this case, it's actually in case vim failed to save the file:
https://vimdoc.sourceforge.net/htmldoc/recover.html