feat: Repeat last command
hovsater opened this issue ยท 3 comments
Feel free to close this if this behavior already exist and I've just missed it. Whenever I use M-'
and M-;
I tend to want to repeat that command one or more times. E.g., "move forward until the third dot" or "move backwards until the fourth comma". Right now, I achieve this by repeating M-' .
three times and and M-; ,
four times.
Coming from Vim, you can repeat the last command by simply pressing .
. Something similar would be really handy in mle
as well.
Thoughts?
Just a friendly ping @adsr. ๐ Would you be interested in adding this behaviour as a default or do you feel it's in extension territory?
Added in eb37d13.
For a future improvement, it would be nice if cmd_repeat
was smart enough to re-use any prompts from the previous command if any existed, or (easier / hackier) to specifically convert cmd_search
to cmd_search_next
and cmd_replace
to cmd_replace_next
.
Boom! Thank you for that! ๐ I'm in the midst of learning C, as I become more familiar with the language I fully intend to experiment with mle source myself. Hopefully I can contribute with code at some point. ๐