Conversation
i had been waiting for these
to support the more advanced motions, combining with count, etc.
why do i never see these
Thank you! From a quick skim of the changes here, the main thing missing is adding tests (e.g. https://github.com/glide-browser/glide/blob/main/src/glide/browser/base/content/test/motions/browser_normal_motions.ts), would you be up for adding tests?
Input methods that operate entirely differently (helix) are not in scope right now, that would just be too much work. Supporting an emacs mode out of the box is something I'd be interested in providing in the future though as it should mostly just be figuring out the right keymaps instead of changing the operating model (afaik I am not super familiar with emacs). |
|
Long-term... When I was developing this I ran into this project: https://docs.rs/modalkit/latest/modalkit/. Would Glide be open to instrumenting with it? Because I know NAPI bindings could be created, and then upon integration would provide a complete emacs AND vim set. Notably, one that we wouldn't have to mantain, as opinions here are particular. Also makes the long-run viabilitiy of newer schools of keybinding thought more feasible to integrate. |
|
yeah I am definitely open to outsourcing the motions implementation. the reasons I didn't go with that originally were mainly around concerns that it'd make customising motions more difficult and I just have no idea what that API would look like. but that said, I think that was a mistake, customising that deep is likely pretty niche and I'm sure we could figure something out if we really need to. |
|
Works, but the issue becomes that there isn't anything like modalkit in the TS ecosystem. I would put in the work, but it would mean bringing in a few hundred lines of Rust code into the tree, compiling that to WASM, and having it handle the motions across the application. Is that acceptable to you in theory?
▰▰▰▰▰
Miles Wirth 🙃
… From: Robert Craigie ***@***.***>
Sent: 23 April 2026 13:22
To: glide-browser/glide ***@***.***>
Cc: Miles Wirht ***@***.***>, Author ***@***.***>
Subject: Re: [glide-browser/glide] MORE MOTIONS (PR #288)
RobertCraigie left a comment (glide-browser/glide#288)
yeah I am definitely open to outsourcing the motions implementation. the reasons I didn't go with that originally were mainly around concerns that it'd make customising motions more difficult and I just have no idea what that API would look like.
but that said, I think that was a mistake, customising that deep is likely pretty niche and I'm sure we could figure something out if we really need to.
--
Reply to this email directly or view it on GitHub:
#288?email_source=notifications&email_token=A3MQBNFJ7GMC5Y6ULWLAS4T4XJ3QNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMZQG43TCOJYGAZ2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2LK4DSL5RW63LNMVXHIX3POBSW4X3DNRUWG2Y#issuecomment-4307719803
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
|
Firefox have their own system for calling into compiled code from JS so we should piggy back off of whatever their setup is, I haven't personally done this before so I'm not sure what it looks like exactly. Having some amount of rust code in the tree is totally good with me. Although I haven't looked into the options here, how confident are you that |
|
There's actually hundreds of motion implementations, but modalkit specifically is ideal because it's made to go beyond just input motions, but whole-application modal keybindings, which fits the bill for an application like Glide. I'm confident in it specifically because it's being picked-up by Nushell see here and used in iamb. Very exciting, I'll do some research later. |
|
Ah interesting, excited to see what it could look like! |
AS A FOLLOW UP QUESTION:
Is it in Glide's scope to support other input methods, like Helix or Emacs bindings? Would be a MUCH larger PR, but interesting to me.