vim 的 binary mode

官方文件在http://www.vim.org/htmldoc/usr_23.html

把 binary 檔案以 hex 的方式 dump 出來

:%!xxd

dump 之後大概會像

0000000: 6364 3130 3030 0045 5552 654b 6100 0803
0000010: c815 160b 3500 0000 0300 0000 bc2e 176c
0000020: 103b 0000 0000 0000 0000 0000 0000 0000

然後要記得轉回去,要不然就搞笑了。

:%!xxd -r

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>