Edit a file in hex using Vim
- To edit a binary file, start vim like so (:w and such will work like a charm then):
vim -b <file>
- To edit a buffer in hex, use xxd this way:
- To return your buffer to normal (and make it save-able):
- To use xxd only for a part of your buffer, you can use your normal buffer selection methods, like visual - just omit the %.