pixel / hexedit

View and edit files in hexadecimal or in ASCII
http://rigaux.org/hexedit.html
GNU General Public License v2.0
98 stars 41 forks source link

Added note and colour tagging functionality #42

Open singe opened 4 years ago

singe commented 4 years ago

This adds the ability to set notes for certain bytes, and to mark bytes or ranges of bytes with custom colours. This is particularly useful when trying to understand a binary format.

These are interactive functions:

Esc-c - prompt to mark a byte or mark'ed range of bytes as one of three colours Esc-o - add a custom note to a byte. It will be displayed in the status line when the cursor is on the byte Esc-d - delete a note Esc-g - display a note Esc-s - write the colour and note markup to a tag file (more on that below)

Markup can be persisted to a simple tag file with the following format:

n: c: colour number is 1 - cyan, 2 - magenta, 3 - yellow For example, a tag file marking up the first two fields of an ELF file in colour and with notes would look like: ``` 0x0 c: 1 4 0x0 n: ELF Magic Bytes 0x4 c: 2 1 0x4 n: 1 - 32bit 2 - 64bit ``` Tag files are written to the currently edited filename with ".tags" appended