I accidentally deleted my .vimrc which took me weeks to config. I still keep the undofile and I think that's the only way I can restore it. Unfortunately, vim now does not allow me to undo (I guess because my current vimrc version cannot be "patched" with the last undo step).
Also, vim undo file is encoded so I cant see its content in human readable form. There was a step where I just deleted all my vimrc with ggvGc
and so if there is a way to decode that vimundo file, I think I can restore it.
Is there anyway I can get my vimrc back? Thank you.
For people coming here years later, it's not possible in recent versions of Vim.
You could try running this to extract what you can from the undo file:
$ strings <undo-file>
See Recover a vim file from the .un~ file without the undo command for more information.
So, as FDinoff suggested, the patch here really works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With