IntelliJ IDEA 13.1 Web Help

To record a macro
  1. On the main menu, choose Edit | Macros | Start Macro Recording. From that moment on, all your recordable actions are recorded.
  2. When you are done with the procedure, choose Edit | Macros | Stop Macro Recording.
  3. In the Enter Macro Name dialog, specify the name of the new macro, and click OK. If the macro is intended for temporary use only, you can leave the name blank.