Tuesday, January 14, 2014

Re: how to return to the previous file?

On Monday, January 13, 2014 8:28:35 PM UTC-6, elear...@gmail.com wrote:
> When editing the file (no name file)

Are you saying that you have not edited any files at all? You just started with an empty buffer with no name, and then entered some text?


> i input `:%!xxd` to check the ascii.
>
> :%!xxd
>

So now you have the hexadecimal representation of the text you typed into the originally empty buffer?


> Vim quit If i input `:q`.
>
> :q
>

Are you saying you actually typed :q to quit Vim? Or that you know using the :q command is not what you want to do, because you don't want to quit Vim?

> I want to return to the previous file

If you are editing a brand new empty buffer without a file name, there IS no previous file. A file is not created until you give your work a name and save it.

If you actually managed to quit Vim without saving your work on a (no file name) buffer, then your work is gone. There is no way to get it back.

> to continue my work.
> How can i do?

What I THINK you're asking, is "how do I restore the text of my file after using xxd?" If I'm way off the mark, try again with a more coherent question.

Using xxd is a change to the buffer content that you can undo like any other change. Press 'u'.

Or, use xxd again in reverse. This keeps changes you made to the binary. This time, use :%!xxd -r instead of just :%!xxd. This information was probably given in the same place you got the hint to use :%!xxd in the first place.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment