Record text editing macros
When you have a file open in the code editor, you can record a keyboard sequence as a macro. You can then play the macro to repeat the sequence. You can save the latest macro and assign a keyboard shortcut for running it or run it from the locator.
Record macros
To record a text editing macro:
- Go to Tools > Text Editing Macros > Record Macro or select Alt+[.
- Select keyboard keys.
- To stop recording, go to Tools > Text Editing Macros > Stop Recording Macro or select Alt+].
Note: The macro recorder does not support code completion.
Play macros
To play the last macro:
- Go to Tools > Text Editing Macros > Play Last Macro.
- Select Alt+R.
- Enter
rm
in the locator.
Save macros
To save the last macro, go to Tools > Text Editing Macros > Save Last Macro.
To view and remove saved macros, go to Preferences > Text Editor > Macros.
Assign keyboard shortcuts to macros
To assign a keyboard shortcut to a text editing macro, go to Preferences > Environment > Keyboard.
See also Assign keyboard shortcuts, Create Lua scripts, How To: Edit Code, and Navigate with locator.