I'd like to view executable file in Vim.
I used :set binary
and thought that I will see only ones and zeros, but nothing changed.
How can I achieve to see only ones and zeros?
To open the Binary Editor on an existing file, go to menu File > Open > File, select the file you want to edit, then select the drop arrow next to the Open button, and choose Open With > Binary Editor.
Right-click the file and click Properties. The image below shows that you can determine the size of the file or files you have highlighted from in the file properties window. In this example, the chrome. jpg file is 18.5 KB (19,032 bytes), and that the size on disk is 20.0 KB (20,480 bytes).
HEX files are supported by several editors, including Heaventools FlexHex, Hex Workshop Hex Editor, and HexEdit. If you have a binary HEX file, it can only be opened with hex-editing programs. If you have a text-based HEX file, it can also be opened and edited with a text editor.
This did the trick for me:
:%!xxd -b
Instead of ones and zeros, you can get an hexadecimal representation with:
:setlocal display=uhex
Also, you can get an hexadecimal dump of a buffer with:
:%!xxd
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With