microsoft / vscode-hexeditor

VS Code Hex Editor
https://marketplace.visualstudio.com/items?itemName=ms-vscode.hexeditor
MIT License
523 stars 85 forks source link

Feature: Cut and insert Data #71

Open Real-MJoe opened 4 years ago

Real-MJoe commented 4 years ago

With the current version 1.1.0 you can already edit, which is cool. What is missing is deleting and inserting bytes.

Otherwise it becomes a useful addin.

jsejcksn commented 4 years ago

I felt very confused that I couldn't use the replace function with no replacement value.

Screen Shot 2020-08-29 at 21 54 36
cmawhorter commented 3 years ago

In the meantime I'd suggest adding a big blinking "does not support adding and deleting bytes" at the top of the readme.

Calling this an editor is technically correct -- which is of course the best kind of correct -- but missing delete feels like something important that people should know.

Denyerec commented 3 years ago

Just wanted to +1 this, needed to tweak a file and had to install HxD to do it instead :(

clnhlzmn commented 3 years ago

What's the blocker to this happening?

lramos15 commented 2 years ago

The main blocker for this is that it requires a rewrite of the data model + the UI wasn't really built in a robust way to allow reflowing when bytes are deleted and inserted. @connor4312 and I are working on getting a better data model and improving the UI to support these features see #309

paw-eloquent-safe commented 2 years ago

What is missing is deleting and inserting bytes.

Ugh I really needed to quickly delete some bytes, guess I'll find another program to do it for me, such a shame really, I think the hex "editor" extension (if you can call it that without add/delete functionality) is really nice otherwise.

Tyriar commented 2 years ago

Just hit this too. In case it's of any use with UX discussions, this is what I did to try delete cells (in order):

The-MAZZTer commented 2 years ago

I expected to be able to author a file from scratch with the hex editor. It's definitely a misstep that I can't even add data to the end of the file (which should be significantly easier than adding to the middle).

The UI is also confusing when viewing a 0 byte file in the hex editor if you're not already familiar with what it looks like.

Tyriar commented 2 years ago

@The-MAZZTer FYI I think the plan is to tackle this issue pretty soon. cc @misolori about 0 byte files being confusing

peternann commented 2 years ago

Until this is resolved properly.... Would it be possible to detect if a user tries right-click->cut, and doesn't actually get a cut result? And then display a message saying "Delete and Insert of data is not supported yet"?

God knows how many hours of developers time has been wasted (like mine) wondering why the 'editor' here doesn't seem to actually be able to edit.

Jinghao1209 commented 1 year ago

In 2023 and still waiting for the Insert feature.

hongshui3000 commented 1 year ago

+1

CatPetrova commented 1 year ago

+1

Yaxit commented 1 year ago

+1 come on it's call editor for a reason no?

bitsybabe commented 1 year ago

I came to GH to add this feature request - I'm glad it's already here! I am exporting binary data using a tool that adds its own data to the exported files, and I'd really like to be able to delete it and have VSCode auto-save the changes. I looked through the data model file and it seems like Insert and Delete were actually considered enum values, but I couldn't quite grok what would need to change to enable them. If you have any docs on what it might take to enable Insert and Delete, I'd be happy to take a stab at it for a possible pull request...

ymuntyan commented 1 year ago

I hate to do a +1, but the issue really is that the addin is called "editor", description says "allows editing", and there is even the Cut item in the context menu. So some users (like me) waste their time on installing it and unsuccessfully trying to edit a file, only to find then that it does not in fact edit files. Nice addin, I like it, but please correct the description at least (but of course actual editing would be super awesome).

freemedom commented 6 months ago

The right click in the menu does not work. But Ctrl+C and Ctrl+V and Delete work. (Ctrl+X does not work.) In addition, "Paste as: UTF-8 Base64" needs to be selected correctly. See https://github.com/microsoft/vscode-hexeditor/pull/334.

ffpp2003 commented 5 months ago

Can anyone insert new bytes?

clnhlzmn commented 5 months ago

I didn't realize that ctrl+c, ctrl+v, and delete are kind of a workaround here.

@ffpp2003 it seems like you can insert "new" bytes if you generate those bytes somewhere else (as base64), copy them, and then paste them (as base64). Though I would say this is a far cry from a "hex editor".

Saafo commented 1 month ago

It's quite lol that another plugin (Hex Editor with Tags) which was fork from this plugin from 2021 can achieve replacing functionality