Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
131
rated 0 times [  131] [ 0]  / answers: 1 / hits: 54475  / 1 Year ago, thu, march 2, 2023, 6:13:19

I have observed that in gedit if I edit a file, another file is created in the same directory (the one with the same filename and a tilde '~' suffix). The extra file remains even if I close gedit.



I understand the need for a temp file (eg. in case of a crash), but vim for example deletes the extra file it creates, when I close it.



Is there a way to do the same with gedit? Some configuration perhaps?


More From » gedit

 Answers
7

Those are just backups of your original files that gedit creates before saving changes to your edited documents.



In gedit preferences you need to disable Create a backup copy of file before saving, and if you want to automatic save your edits automatically set a timer with the option enable Autosave files every X minutes.



That way the ~ will be gone and your last changes will be saved on the file every x minutes in case something goes bad or your computer crashes.



enter image description here



The changes made to the file will be saved to the file itself and not to a temporary file.



Please be aware that if you delete the contents of a file and auto save is enable there will be a chance that you end up with a saved empty file.



Always make sure that when you close on file while auto save is enabled that the contents of the file are correct, else undo them and save the file again.


[#41810] Thursday, March 2, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fulerio

Total Points: 172
Total Questions: 124
Total Answers: 109

Location: Hungary
Member since Thu, Aug 6, 2020
4 Years ago
fulerio questions
;