OpenVi icon indicating copy to clipboard operation
OpenVi copied to clipboard

Feature request: ctrl-w instant erase, similar to bserase

Open joohing opened this issue 4 months ago • 4 comments

Hey, thanks for your work on OpenVi, I use it daily!

I'd love for there to be a feature which enables instant erase when using ctrl-w and ctrl-u, similar to how you can enable bserase.

joohing avatar Sep 27 '25 14:09 joohing

@joohing Hi!

Yes - I don’t see why that wouldn’t be something worth implementing. I’m open to a suggestion for the name too. Give me a couple days!

johnsonjh avatar Oct 07 '25 23:10 johnsonjh

Actually, maybe it would be worth it to lump it into the same feature as bserase, and then just call it instanterase. I think having the two as separate features would "cover the same ground twice". But of course changing the meaning of bserase would also compromise with backwards compatibility.

Otherwise, in the same way that bserase is named in relation to the key for which the setting enables instant erasing, you could just name it ctrlwerase. I think users of bserase would likely know what that does just by reading the name. :)

joohing avatar Oct 08 '25 12:10 joohing

@joohing I’m on my phone so I didn’t really test it, but please tell me if the branch https://github.com/johnsonjh/OpenVi/compare/master...20251008/johnsonjh/bserase does what you want. I’ll test more extensively later.

Since “bserase” is an OpenVi extension (and not adopted by upstream OpenBSD at this time) we have a bit more wiggle room for modifications, but I also don’t like the idea of breaking compatibility, so I think I would prefer to have a new option for this, rather than extending bserase or renaming it.

But I’ll have to think on it a bit more.

johnsonjh avatar Oct 08 '25 13:10 johnsonjh

Branch appears to work pretty nicely!

joohing avatar Oct 08 '25 17:10 joohing