fidian / hexmode

Vim plugin to edit binary files in a hex mode automatically.
147 stars 19 forks source link

Keep marks when saving on binary file #44

Open mjsir911 opened 9 months ago

mjsir911 commented 9 months ago

When I :w when editing a binary file with vim -b <filename>, all my marks get deleted. This is especially frustrating when undoing a change and saving and not staying on the same line that I was on before saving.

I see that you use winsaveview, it looks like that doesn't include marks. Maybe something to do with :loc or getloclist or getmarklist (although I'm not sure how to restore from these)

fidian commented 9 months ago

I've mentioned this in other issues but it bears repeating here. I'm not fluent in vimscript and I've just decided to host a copy of this script in GitHub so updates and fixes could be made.

It would be extremely welcome if anyone viewing this issue would be able to help out and update the script to address this problem. Without outside assistance, I'm positive that I won't be able to make the changes myself - vim is still quite a mystery to me.

mjsir911 commented 9 months ago

Appreciate you stewarding this project @fidian, yeah I'm just filing this for a time where someone (maybe me) can come along to take a stab at this.

ty again!