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.
No description
6 Replies
dys 🐙
dys 🐙2d ago
Those are backups of the previous version in case you accidentally lose something. How you turn them off, I dunno.
Jochem
Jochem2d ago
they should also just go away once you close the file unless something went wrong or you force-quit vim
snxxwyy
snxxwyyOP2d ago
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.
snxxwyy
snxxwyyOP2d ago
like dys says, if they're backups then i understand why they're there, but i feel that could clutter pretty easily eventually haha
clevermissfox
clevermissfox2d ago
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
ἔρως
ἔρως2d ago
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

Did you find this page helpful?