showkey
showkey

Reputation: 358

how to return to original binary file after converting with xxd

When editing the file in vim ,i input :%!xxd to check the ascii.

:%!xxd

Vim quit if i input :q.

:q

I want to return to the previous file to continue my work.
How can i do?

Upvotes: 0

Views: 510

Answers (2)

Bambu
Bambu

Reputation: 548

%!xxd -r will work if you have not made changes or if you would like to save the changes.

If you would like to disregard any changes you could do something like

:e! %

or just undo until you get your original file

Upvotes: 1

waitingkuo
waitingkuo

Reputation: 93754

:%!xxd -r to return back to normal mode

Upvotes: 3

Related Questions