I'm learning the basics of navigating/editing in Emacs and I'm curious how one could accomplish the following task:
Let's say I want to repeat it five times to generate 'bla bla bla bla bla '. I tried...
C-u 5 bla
...but the command executes after the 'b' is entered, and I only get 'bbbbb'.
I'm sure there's some basic command that can help me here...would somebody be kind enough to enlighten me :)?
The command C-x z ( repeat ) provides another way to repeat an Emacs command many times. This command repeats the previous Emacs command, whatever that was.
Immediately after typing C-x e , you can type e repeatedly to immediately repeat the macro one or more times. You can also give C-x e a repeat argument, just like F4 (when it is used to execute a macro).
One way is via a keyboard macro:
C-x (bla C-x)C-u4C-xe
You can also just insert the repeat count before the macro termination:
C-x (bla C-u5C-x)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With