Home Download Buy Blog Forum Support

Binary File Reading Plugin

Binary File Reading Plugin

Postby facelessuser on Sat Oct 29, 2011 5:49 am

I have just started throwing together a plugin to show the hex output of a binary file. I still have some work to do on it, but I wanted to see if anyone was interested in something like this. I am just looking to see how much time I should spend on polishing it up. If there isn't any real interest, I will just finish it up for myself.

I plan to have the byte size configurable and the bytes per line configurable.

I don't plan on making it editable; at least not in the immediate future. I would have to think about how I would implement that.

Anyways, if you like the idea let me know, and I will push for a polished release.

Image
Last edited by facelessuser on Sun Nov 06, 2011 3:41 pm, edited 1 time in total.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: Binary File Reading Plugin

Postby kefka0 on Mon Oct 31, 2011 7:42 pm

I've been wondering if something like this existed, and I was even thinking of trying to do it myself, so yes I'm definitely interested. PM me if you would like any help with it.
kefka0
 
Posts: 11
Joined: Wed Aug 17, 2011 11:20 pm

Re: Binary File Reading Plugin

Postby facelessuser on Mon Oct 31, 2011 8:00 pm

Cool. It might be nice if you could give it a try, I think I really need feedback on how I have implemented it. I think I am too close to it to give it a good evaluation. I need to get one more commit in tonight that changes how I do things, but I will PM you after that and maybe you can give it a try.

Feedback, suggestions, and requests are more than welcome.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: Binary File Reading Plugin

Postby bizoo on Mon Oct 31, 2011 8:28 pm

Go ahead and put it on github.
I use a second editor only for this feature, so I will be more than happy to test it and eventually participate with patches.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Binary File Reading Plugin

Postby facelessuser on Mon Oct 31, 2011 8:42 pm

I'll post a link publicly then tonight/tomorrow morning for beta testing. I need to get this last commit in though first; it fixes a lot of things.

I'm glad there is some interest. I have also currently been using another editor to look at binary files, so I am finding this pretty useful.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: Binary File Reading Plugin

Postby bizoo on Mon Oct 31, 2011 10:23 pm

Thanks for your works.
The printscreen look great, exactly what I need.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Binary File Reading Plugin

Postby facelessuser on Tue Nov 01, 2011 3:15 am

Okay here is the link:

HexViewer

The default bit grouping and bytes per line are configurable via the settings file. Currently, to initiate the hex view, you select the command from the command palette.

Just start typing "Hex Viewer" in the command palette to see the commands. One allows you to toggle the hex view on and off. The other two allow you to change the bit grouping and bytes per line on the fly (it will open the quick panel with the available options).

The Hex View tab is a read only tab that replaces the current open file. When you toggle back, the hex view closes and the original file is opened. If you save the hex view as a file, it becomes an actual file that is no longer linked to the source file (the original file will pop back up in this case and you can do it again).

Let me know if you have issues or suggestions...basically, just give me feedback so I know if you like, hate it, etc. I am considering this a beta since I am the only one who has tested it so far.

Enjoy!
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: Binary File Reading Plugin

Postby facelessuser on Tue Nov 01, 2011 6:16 am

Sorry I was always testing with more than one file open. I found a bug when only one file is open and you could not toggle hex view. This has now been fixed.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: Binary File Reading Plugin

Postby bizoo on Tue Nov 01, 2011 6:59 am

Just get it a give it a try, I've no time right now to look how it works. Maybe later today.

The first (and right now only) issue I have is that the alignment is off on my configuration:
I use Meslo LG font and to make it look right I need to change the font of the view:
Code: Select all
view.settings().set('font_face', 'Fixedsys')

This is for Windows 7.

I think that a settings to specify the font and font size is required, I will implement it when I have some times.

Thanks again.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Binary File Reading Plugin

Postby facelessuser on Tue Nov 01, 2011 1:53 pm

bizoo wrote:The first (and right now only) issue I have is that the alignment is off on my configuration:
I use Meslo LG font and to make it look right I need to change the font of the view:


Completely didn't think about this. This is a great suggestion. If you get to this, let me know; either that, or I will take care of it. It should be quick easy fix to expose a setting like this.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Next

Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests