I’ve started working on an extension that emulates Kakoune (think Vim) keybindings, and part of what’s necessary for that to work properly is to only allow writing while the user is in input mode. There is currently no way to do this aside from re-binding all alphanumeric characters, symbols, punctuation marks, etc. That would be extremely tedious, and bloat the
extension.json a lot.
I’m wondering if you have something in mind for mitigating this? Solutions that come to my mind are:
- Allow an extension to take over all input handling
- The extensions would then be responsible for delegating input handling to Nova when some condition is fulfilled
- Allow an extension to selectively disable writing, but still receive input events
- Make modal editing a more integrated part of Nova
- Here Nova would have to ship with a core ‘Insert’ mode
- Extensions would define other modes and handle inputs while in those other modes
I’m sure there’s a good way to do this, but I’m not sure what the best way to solve this is . I’d love to hear your thoughts.
I haven’t done much work on the extension itself so far, but if you’re curious to see what I’ve done so far you can have a look here.