Hacker News new | ask | show | jobs
by dietrichepp 4259 days ago
Any time you're working with tabular data, or data that is aligned horizontally, it's helpful. For example, I might need to delete a prefix from a list of declarations. I often use macros for the same kinds of tasks, with each macro editing a line and putting the cursor on the next line afterwards.
2 comments

apply-macro-to-region-lines does not need macros to put the cursor on the next line.

From the manual: The command C-x C-k r (apply-macro-to-region-lines) repeats the last defined keyboard macro on each line that begins in the region. It does this line by line, by moving point to the beginning of the line and then executing the macro.

Take a look at multiple cursor mode for this.