By default vim cannot do that for you. But you can use cool tool xxd. Simply use this:
:%!xxd
and instead of saving the file run this:
:%!xxd -r
This info is from this blog:
http://www.kevssite.com/2009/04/21/using-vi-as-a-hex-editor/
__ ___
/\ \ /\_ \
___ \ \ \____ \//\ \ ___ __
/' _ `\ \ \ '__`\ \ \ \ / __`\ /'_ `\
|/\ \/\ \ \ \ \L\ \ \_\ \_ /\ \L\ \/\ \L\ \
\ \_\ \_\ \ \_,__/ /\____\\ \____/\ \____ \
\/_/\/_/ \/___/ \/____/ \/___/ \/___L\ \
/\____/
\_/__/
By default vim cannot do that for you. But you can use cool tool xxd. Simply use this:
:%!xxd
and instead of saving the file run this:
:%!xxd -r
This info is from this blog:
http://www.kevssite.com/2009/04/21/using-vi-as-a-hex-editor/
Tags