I tried opening the .swp file using vi and cat but it displays junk.
feedback
|
|
You don't need to have to original file to recover the .swp. Just open the file as if it exists. vim will look for the file with the .swp extension and offer to recover it. e.g.:
Just press r for recover and :wq the file Edit: Note that the .swp file only contains the changes done to the file (see comment). This means that you will need to fetch a recent copy of the file from backup and then use vim to recover the latest changes. If you don't have a backup copy of the file your really out of luck. | |||||
feedback
|
|
Open the original file using vim, and choose the recovery option. | |||||||
feedback
|
This goes into recovery mode and gives you more info. I think this is what you want.
| ||||
feedback
|