Tuesday, April 22, 2008

Emacs Tip: Keyboard Macros

If you find yourself doing a repetitive set of keystrokes, but don't want to bother with learning how to actually write a script for that, then record a keyboard macro.


C-x ( begins recording
C-x ) ends recording
C-x e executes the last keyboard macro
C-x C-k lets you edit the keyboard macro you just wrote

If find yourself using lots of macros, you can even save them to your
.emacs and name them (for later use).

For more documentation, see the info page:

C-h K C-x (

Or check out the Keyboard Macros section in the Emacs wiki.

No comments: