Use the vim command :%! xxd -b to edit binary like in this example: vim /path/to/filename note: you can drag and drop the file into the terminal to ...
Bvi stands for Binary VIsual editor. Bvi is a display oriented editor (hex editor) for binary files. Its command set is based on those of the vi texteditor.
The hexedit command provides a way to edit binary files, but to view and save the content in a file for later analysis without editing, try the xxd command.