Emacs Elements has a new video up. This one is about simplifying—perhaps “rationalizing” is a better word—the Emacs repeat commands. Those of you familiar with Vi(m) know that one of its nice features is a simple repeat command bound to the period key. Once it finds its way into your muscle memory, it’s surprising useful.
Sadly, Emacs’ repeat command(s) are a bit more difficult and not as useful. Still, they can be handy on occasion but, as Emacs Elements notes, they are bound to keys that can charitably be described as “arcane”.
One of the problems with Emacs repeat is that there’s not one but two commands: the simple repeat and the complex repeat. What distinguishes one from the other has always seemed a bit murky to me but Emacs Elements explains it well: if the command requires using the minibuffer, it’s a complex repeat. Otherwise it’s a simple repeat.
Emacs Elements rebinds the simple repeat command to Ctrl+., which is similar to Vim’s, and the complex repeat to Ctrl+z. Those bindings are simple to remember and make Emacs’ repeat commands worth getting used to.
I can see it being useful for repeating commands such as “delete 5 chars” when you want to delete a bunch a bunch of text but aren’t sure how many characters need to be deleted. Regardless, if you think you might find the repeat commands useful, it’s definitely worth your while to rebind them to something simple that doesn’t require multiple keystrokes.