How do I edit binary files with Vim?
You can set the following options to edit binary files in Vim:
:set binary :set display=uhex
You can also use the “-b” command-line option to edit a binary file:
$ vim -b
You can also use the xxd utility (part of the Vim distribution) to edit binary files.