- Open the file in Vim.
- Run the command
:% ! xxd - Edit.
- Once done, run
:% ! xxd -r - Save.
Original source: https://stackoverflow.com/questions/827326/whats-a-good-hex-editor-viewer-for-the-mac
:% ! xxd:% ! xxd -rOriginal source: https://stackoverflow.com/questions/827326/whats-a-good-hex-editor-viewer-for-the-mac