Zamansky on Keyboard Macros

Mike Zamansky has another video up in his Using Emacs Series. This time it’s about keyboard macros. I’m always inclined to think that everyone knows all about them but I keep reading tweets about people discovering their power and being amazed so Zamansky’s video is apt to be useful for many people.

If you aren’t using keyboard macros, you’re almost certainly working too hard. Zamansky gives a couple of examples that show how macros can make quick work of repetitive tasks. Often you can accomplish these tasks with something like multiple-cursors but keyboard macros are built in and always available. Zamansky compares them to a Leatherman but I like the Swiss Army Knife analogy better. In either case, the point is that macros are a flexible and powerful tool to quickly get things done. As Zamansky says, there might be a better tool for a particular task but macros are almost always good enough.

Take a look at the video to see a few more tricks like counters and saving macros. The only thing I would add is that the ability to repeat the macro a fixed number of times or until the end of the buffer is often useful. On the other hand, as Zamansky says, usually it’s just as easy to manually repeat the macro the required number of times.

As usual, the video is short—11:31 (min:sec)—so it should be easy to find time to watch it.

This entry was posted in General and tagged . Bookmark the permalink.