Macros
Macros allow you to chain multiple commands into a single executable action. This is powerful for automating repetitive tasks.
Creating a Macro
- Go to Settings > Commander > Macros.
- Click Add Macro.
- Give your macro a Name and select an Icon.
- Use the Add Command and Add Delay buttons to build your workflow.
Macro Actions
- Command: Execute any Obsidian command.
- Delay: Wait for a specified amount of time (in milliseconds). This is useful if a command needs time to complete (e.g., waiting for a view to open) before the next command runs.
- Loop: Internal logic supports loops, allowing a command to be executed X times.
Auto-Run on Startup
You can check the Auto-Run on Startup box in the Macro Builder. This will execute the macro automatically every time Obsidian launches.
Usage
Once a macro is saved, it becomes a command itself. You can:
- Run it from the Command Palette.
- Add it to the Ribbon, Toolbar, or any other Commander location just like a regular command.
Example Workflow
"Morning Setup" Macro:
- Command:
Daily notes: Open today's daily note - Delay:
200ms - Command:
Graph view: Open graph view - Command:
Split right