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

Considerations for the window size #69

Open bradenbest opened 3 months ago

bradenbest commented 3 months ago

I just tried using this program (v1.4.2 based on the manpage) in my fullscreen terminal and found the column numbers on the side difficult to read, because they are huge and based on the size of the terminal. I also noticed that the manpage points out a bug where on Redhat 5.0, curses thinks the terminal window is huge, making the program unusable.

Both my issue and that bug could be fixed by adding functionality to resize the program from within the program. Or perhaps invert -m as it seems to do that by default. For my own purposes, -l 16 works just fine:

image

Though IMHO -l 16 should be the default (the reason for 16 becomes clear when you look at the row headers: 10, 20, 30, ...).

Edit: I guess -s is the same as -l 16? The manpage isn't clear about what "sector" means. From observation, the default behavior is to group in 4 bytes whereas -s changes it to 8 bytes and also sets the line length to 16.

Some things to consider.

bradenbest commented 3 months ago

That said, this is a very functional tool, quick, convenient and usable over ssh. Which is great because while xxd is a thing, it can be tedious and sometimes I just get tired of using xxd to edit binary files because you either have to xxd into a temp file, edit the temp, and then xxd -r the temp file back into the binary, or you have to be extra careful to make sure vim doesn't, say, force a linefeed at the end or encode to utf-8 despite :set binary because it's been long enough since the last time for me to forget little details like :set fenc, :set enc and :set ff.