Macros

Macro is a sequence of CudaText actions, which can be saved to a file and invoked later by some command.To use macros, you must install plugin "Macros" from Addon Manager. It adds "Macros" menu to CudaText main menu bar. This menu gives items:

  • Macros…
  • Start record
  • Stop record
  • Cancel record
  • Export…
  • Import…
  • (items for saved macros)

To record a macro:

  • call menu item "Macros / Start record", or use dialog "Macros / Macros…" which gives "Start record" button too
  • pefrorm some action(s) in CudaText:
    • built-in commands, plugin commands (invoked by hotkey, by menu, by Command Palette)
    • some mouse actions (clicks/selections, they save/playback relative to caret position)
    • calling of Find/Replace dialog, "Go to" dialog
    • actions in Find/Replace dialog
  • call menu item "Macros / Stop record" to save your macro, plugin will ask for macro name

Macro saves action(s) performed inside its original editor tab (not other tabs). And it doesn't save actions inside plugin dialogs (e.g. FindInFiles).

To playback macro:

  • call menu item "Macros / (macro name)", the end of this menu lists all available/saved macros
  • or call dialog "Macros / Macros…" which allows to run available macros: it can be simple running, running N times, or running in loop ([x] While text changes, [x] Until caret on last line)