How can I restore a vim file from the undo
file without hitting undo
?
I had a vim file that I saved while adding text. Then I ran a python command that emptied the file's contents, and I can see some of the words the file contained in the file's .un~
file. When I try to undo in the file, it says Already at latest change
. I can't find the swap file in my swap files directory.
set bk?
andset wb?
– Granada?
, is a part of the command. I am trying to get your backup setting, to see if it is possible to restore the file from your vim-backup file. – Granada:%s/\v^@{3}./\r/g
on my vim undo file to get some useful results. (PressCtrl
+@
to input the null character shown as^@
; on US layoutsCtrl
+2
orCtrl
+Shift
+2
should work) – Deranged