Hex editors need special optimizations (different from text editors) which are typically not implemented. This project was inspired by Simon Tatham's article and is an effort to apply his ideas into a minimal but practical editor.
Operation | Complexity |
---|---|
Replace | O(1) |
Copy-paste | O(1) |
Insert | O(log(n)) |
Delete | O(log(n)) |
Seek | O(log(n)) |
Search | O(n) |
Save | O(n) |
The engine implements lazy file loading and copy-on-write; thus, memory usage is minimal (proportionally to changes). Copy-paste is not an insertion operation! This means pasting the same block in multiple places does not increase memory usage proportionally to the block size. One could view this as a form of compression.
Simon Tatham created tweak which is more of a proof-of-concept rather than a full-fledged hex editor.
- Replace
- Copy-paste
- Insert
- Delete
- Seek
- Search
- Save
- Implement Simon Tatham's engine
- Kaitai Struct support
- Toggle ascii panel
- Mouse support
- Status bar
- Color themes (cycle at runtime)
- Configurable key bindings
- Automatically-adjusting panel to fit console
- Install Nim
- Clone
- Compile (
nim c -d:release -o:hexalepis main
) - Run
./hexalepis <filename>
Key | Action |
---|---|
ctrl+q | exit |
ctrl+s | save (in-place) |
u (or ctrl+z) | undo |
ctrl+r | redo |
esc | cancel |
h, j, k, l (or arrows) | movement |
home | go to beginning of line |
end | go to end of line |
pageup, pagedown | vertical scroll |
[ ] | horizontal scroll |
tab | change panel |
m (in hex panel) | mark byte |