<p>Sometimes when editing binary files and embedding data into/from programs I have the need to hex copy/paste large segments of data. When I was working heavily with this in a private company we had 010 Editor which is simply amazing and has some options that I think could be replicated in Geany, they are:</p>

<ul>
<li>Paste from Hex</li>
<li>Copy as Hex</li>
<li>Copy as C array</li>
</ul>

<p>Paste from Hex (ctrl+shift+v for example) takes data like:</p>

<p>54 52 55 45 56 49 53 49 4f 4e 2d 58 46 49 4c 45 2e</p>

<p>And  paste as:</p>

<p>TRUEVISION-XFILE.</p>

<p>And the opposite should be valid, copying (ctrl+shift+c for example) would turn this into the hex again.</p>

<p>Copying as C array would produce:</p>

<p>{ 0x54, 0x52, 0x55, 0x45, 0x56, 0x49, 0x53, 0x49,<br>
0x4f, 0x4e, 0x2d, 0x58, 0x46, 0x49, 0x4c, 0x45,<br>
0x2e }</p>

<p>Note the break at 8 bytes, could be configurable by the plugin maybe.</p>

<p>Paste from hex should also support pasting mixed represented hex data like:</p>

<p>41 0x42 43h 44H</p>

<p>Would produce:</p>

<p>ABCD</p>

<p>All blank spaces, tabs, cr and lf are ignored. In the case where there is no blank space each 2 bytes must represent an hex byte and the total length of the clipboard must be even.</p>

<p>In case of bad hex data the conversion should not be done, bad means anything not hex like:</p>

<p>4G H7</p>

<p>I could work the code to convert to/from in C language, I just don't know how to work with GUI and plugins so if someone is interested...</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/geany/geany-plugins/issues/417">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ4avb7hfHQoyhehwa_N3-CGbY4ERks5pyR0xgaJpZM4H6rkc.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany-plugins/issues/417"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>