Is there a shortcut (key combination) in emacs
to repeat the second last command? Or
third last command and so on? I know that Ctrl + x + z
can be used to invoke the last command, but could not find a key combination for others!
Asked
Active
Viewed 253 times
0

Vombat
- 1,156
- 1
- 15
- 27
-
Can you not pass a prefix arg? Try `Ctrl` + `u`, `2`, `Ctrl` + `x`, `z`. – Randy Morris Jun 27 '16 at 14:14
-
@RandyMorris seems like this runs the last command twice instead of running the last last command! – Vombat Jun 27 '16 at 14:25
-
1Ah, I was looking at the docs for `repeat-complex-command`, not `repeat`. My apologies. – Randy Morris Jun 27 '16 at 14:32
-
`repeat` is literally repeat. It repeats the same command that invoked it. A prefix arg is passed to that command. A prefix arg to `repeat-complex-command` lets you edit and re-evaluate the last complex command expression. – Drew Jun 27 '16 at 15:52
1 Answers
1
In a related question: Is there a (repeat-last-command) in Emacs?
There is this answer: https://stackoverflow.com/a/8105886/138470
Which looks like what you're asking for.