next up previous contents index
Next: Undo redo Up: Editing Previous: Mark and region



A macro memorizes a sequence of commands.


In a buffer of 100 lines, you want to add an 'X' at the beginning of each line and an 'Y' at the end of each line. The following macro does this work: at the beginning of the first line type the following sequence: Ctrl-x ( X Ctrl-e Y Ctrl-f Ctrl-x ). Then Esc 99 and Ctrl-c.

Attention A macro can include only one search command. If you want to use several search commands or more generally, if you want to implement a complex macro, it is better to write a smac function (see Built-in editor functions).

Lionel Fournigault
Mon Mar 6 13:33:34 MET 1995