A macro is a named list of steps played into the focused pane of the active tab:
- Send text: sent as if typed, so multi-exec forwards it too.
- Wait: pauses for a number of milliseconds.
- Wait for text: waits until the pane's output contains a text (colours and other escape sequences ignored), for up to a timeout in seconds (10 by default). If the text does not appear, the macro stops and the pane shows why.
Record macro in the toolbar (or Ctrl+Shift+R) records everything typed or pasted in the focused pane until you stop it; each line becomes a send step. A red Recording banner stays visible the whole time. When you stop, name the macro to save it, or discard it. Recordings do not include pauses: add Wait or Wait for text steps in the editor where a command needs time (e.g. before typing a password).
The Macros sidebar tab lists the macros with a search box; each one can be played, edited, duplicated or deleted. While a macro plays, a bar shows its progress; Stop or Escape ends it. The editor changes the name, the hotkey and the steps (add, remove, move up or down, change the kind). Ctrl+Alt+1 to Ctrl+Alt+9 play the macro bound to that key; a hotkey belongs to one macro, so giving it to another macro moves it.
Text in send and wait-for steps accepts escapes: \r (Enter), \n, \t, \e (Escape), \\, \xHH, and ^A to ^Z (e.g. ^C), ^[ (Escape) and ^? (Delete). Anything else is sent as written.
Variables
Send and wait-for texts can ask for values each time the macro plays, which turns a macro into a snippet such as docker logs -f {{container}}\r:
{{name}}is a variable; names start with a letter or_and go on with letters, digits,_or-.{{name:default}}prefills the field withdefault(a default cannot contain braces). When a name appears more than once, it is asked once and its first default is used.{{{{types a literal{{. Braces that do not form a variable (e.g.{{a b}}or{x}) are sent as written.
Playing a macro with variables, from the Macros tab, its hotkey or the command palette, first opens a dialog with one field per variable, in the order they first appear. The fields show the values you typed the last time you played that macro since PlexusTerm started, or else the defaults. Play or Enter plays the macro with the values in place; Cancel or Escape plays nothing. Values are typed exactly as entered (escapes such as \r in a value are not interpreted) and are never saved: macros.json keeps only the {{name}} placeholders. A macro without variables plays at once, without the dialog.
Macros are saved as plain text in macros.json in the app config directory (readable only by you). Everything you type while recording is saved, including passwords; nothing is masked or filtered. If the file cannot be read, macros cannot be edited until it is fixed, so it is never overwritten.