Kungsgeten / ryo-modal

Roll your own modal mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repeating a complex command

sriramkswamy opened this issue · comments

Let's say I have such a mapping

(ryo-modal-key "d i a" 'mark-whole-buffer :then '(kill-region))

If I try to use repeat on this, it repeats only mark-whole-buffer and does not kill-region.

Hi! Sorry it took so (very) long time for a response. I've tried various solutions, but nothing really seem to work. Ryo is using call-interactively for all of the commands (both mark-whole-buffer and kill-region in this case), and I guess those commands "push" to repeat.

I've just written a function called ryo-modal-repeat which should work like repeat, but only for ryo commands. Please try it out (more info in README and docs) and let me know if it works for you!

Also I must say I'm very impressed by your ryo-based config: huge work!

Thanks, this is great news. I tried and it works pretty well.

Also I must say I'm very impressed by your ryo-based config: huge work!

Thank you! It seemed to be the perfect solution for my problems to map any combination of keys I want (mapping things like co or do in evil is a pain) and use the Emacs ecosystem that I like. However, it still has a LOT of things to be done for it to feel nearly as productive as my Vim setup.