Thursday, November 5, 2020

Re: .swp files



On Thursday, November 5, 2020 at 6:48:52 AM UTC-5, Kevin Reynolds wrote:
God Damned Vim.
It keeps trashing my files.  I just lost a file that included everything I did in 2019 for some unknown reason.  I open up the file and vim tells me it's already open.  So I recover it, and 90% of it is gone.  This is not the first time either.  God Damn vim.  I like vim but I will never use it again.  It keeps trashing my files.  God Damn you!

 Sorry for your loss, but wonder what actually happened.   I've personally found Vim to very reliable, but I also use Mercurial (or Git) to track all file changes and keep backups on remote servers of all of my important text files.

Do you use any other editors?  Vim normally keeps a recovery file while you're editing.  If the editor does crash, then there is a possible good copy to recover from.  The file should get deleted after properly exiting Vim ( this is my world view and may not be shared by those who actually know) but gets left behind otherwise.  Assuming the latter happened and you then edited the file after that with a different editor, Vim wouldn't be aware of those changes.  Then, if you did come back to Vim, the recovery file would be old/out of date.

One you noticed the wrong information was loaded, the next step before doing anything is to either a) :q! without saving anything and/or b) go to a different terminal to verify/copy the original correct file.

And as Maxim suggested, a 2019 file should be on a backup  drive.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/8195a28c-f4cb-4ed4-8536-ff383874f2a1o%40googlegroups.com.

No comments:

Post a Comment