Closed AlexZoe closed 1 year ago
This issue is present in other plugins as well and requires a more deeply rooted solution, one that provides nvim with the idea that a buffer can be viewed in more than one representation (binary files as hex dumps, image files as ascii art, csv files as tables .. etc) and each representation must have its own buffer.
I've started working on such plugin a while back but I couldn't find the time to finish it, maybe I will someday soon. Thanks for your contribution!
It seems that
xxd
does not work well when omitting the input/output file. HexDump and using "%! xxd -g 1 -u" direclty appears to randomly insert characters. Explicitly providing the file name fixes the hex dump.This partially fixes Issue #6 .
Attempts to save the buffer still results in a broken binary file. I presume the
xxd
has the same issue when assembling the hex file if the input file is omitted.Not sure how to best solve that issue. Maybe save the hex dump to a tmp file and then use something like: