History Report a problem
Article Edit this page Discussion

Recover overwritten file

From Vim Tips Wiki

(Redirected from VimTip286)
Jump to: navigation, search
 

Tip 286Previous TipNext Tip

Created: July 23, 2002 Complexity: basic Author: Little Dragon Minimum version: 5.7 Karma: 160/53 Imported from: Tip#286


I was once editing a file and wanted to test something. The test was meant to add a line at the end of the file, from outside Vim. All was fine, but instead of >> to append the output to the file, I wrote > to replace the file with the output by mistake.

If you happen to do something like that, the solution is:

:recover

This command only works if you have a swap file. If you do not have a swap file, the recover command will not work.

[edit] Comments

 

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Recover overwritten file"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation