Thursday, May 6, 2010

Re: Recover a deleted file from its swap file

On 07/05/10 05:29, Nazri Ramliy wrote:
> I have a vim swap file for a file that I have just deleted.
>
> It is possible to get vim to (sort of) recover the content of the file
> referred to by the swap file?
>
> Thanks in advance for any help.
>
> nazri.
>

Not sure:
- Does the swap file still exist? (usually .filename.ext.swp and by
default in the same directory as where the file used to be, but many
people put that elsewhere, or set 'noswapfile'... only to find when it's
too late that they lack esential information.
- Did you use :preserve before deleting the file?

See
:help :preserve
:help :recover
:help ATTENTION
:help -r
:help crash-recovery

If you close Vim, it will delete the swapfile. Of course if you kill it
without letting it react ("kill -9" on Unix-like sstems) it won't...
unless it's already gone.


Best regards,
Tony.
--
Impossible, adj.:
(1) I wouldn't like it and when it happens I won't approve;
(2) I can't be bothered; (3) God can't be bothered. Meaning (3) may
perhaps be valid but the others are 101% whaledreck.
-- Chad C. Mulligan, "The Hipcrime Vocab"


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: