Skip to content

Conversation

@singe
Copy link

@singe singe commented Jun 25, 2020

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 1-3>
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant