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
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.
Imagine everyone around you argued about it was better to wear socks or to wear shoes, and you just have to wonder why they don't try doing both at once?
Now I wonder if there are people who use Emacs controls in vim and wear their socks outside their shoes.
1. https://media.gq.com/photos/55828bdde52bc4b477a97e03/master/...