News for hackers. Stuff that matters.
Re:Joining the Church of Emacs by p4bl0 on Monday October 03, 2022 @04:15AM (#33064794)
Yes you can do that in Emacs of course. Default key bindings are "C-x (" to start recording, "C-x )" to stop, and "C-x e" to play the macro — and then you can just press "e" to repeat it again and again.

This is one of the feature that I miss the most when I'm using another editor. So much that I spent some time this summer implementing keyboard macros in Kate, which is also a very nice text editor :). See https://news.ycombinator.com/item?id=32585221

Re:Joining the Church of Emacs by daptaq on Monday October 03, 2022 @05:32AM (#33065218)
> and then you can just press "e" to repeat it again and again.

You can also pass C-x e a 0-prefix argument (M-0 C-x e) and it will repeat the macro until the bell rings, which usually happens when a movement command like forward-line, forward-sexp, etc. reaches the end of a buffer.

Another strategy is to record a macro that only operates on a single line, then mark the region you want to repeat it in for every line and then execute it on all these lines using C-x C-k r.

Re:Joining the Church of Emacs by lordgrenville on Monday October 03, 2022 @04:51AM (#33064980)
Since parent is using evil, they can just use q as in Vim (evil-record-macro) in place of kmacro. But the "rendering issues" would presumably apply either way.
Re:Joining the Church of Emacs by tmtvl on Monday October 03, 2022 @04:51AM (#33064978)
Alternative default bindings are "F3" to start recording and "F4" to stop recording or replay a macro.