I am a new vim user and currently using neovim on Linux. I my whole project which I had written in one file (only 1 day of work).
There are two ways I could've lost it:
I saved the file but accidentally deleted this or used the
cp
command with wrong arguments (because there is a copy of a similar project in my current file which I used as a starting template).I didn't save the file all this time and quit; now I just have the template I began with. I am not sure about this one because I remember saving it.
Does vim keep some kind of in-ram repository of files which you quit? This would save me a lot of time.
Thanks in advance.
set backupdir=~/.cache/vim/backup
for exactly this reason; which has saved me on a few occasions. I don't know what the default for this is on Neovim, but you can see if it's set (:set backupdir?
) and see if your files are in there.