Custom Todos: Difference between revisions
Created page with "== Shortcuts ==" |
No edit summary |
||
| Line 1: | Line 1: | ||
== Shortcuts == | == Shortcuts == | ||
# TODO Task Label Prefixes & Variables | |||
TODO task labels support special prefixes and variables that control how tasks are rendered in the UI. | |||
## Prefixes | |||
Prefixes are detected by examining the **first character** of the label after trimming leading whitespace. | |||
### `.` (Dot) – Inline/Child Tasks | |||
Prefix a task label with `.` to make it an **inline child** of the preceding non-dot task. Child tasks are displayed in a grid row alongside their parent, creating a compact horizontal layout. | |||
**Behaviour:** | |||
- The `.` prefix is stripped from the displayed label | |||
- The task is grouped with the previous non-dot task as a child | |||
- Displayed in a shared grid row (parent + children side by side) | |||
- Checkbox is still shown (can be checked/unchecked) | |||
- If a dot-prefixed task appears without a preceding parent, it is treated as a regular individual task | |||
**Example:** | |||
``` | |||
Monday Breakfast | |||
.Lunch | |||
.Dinner | |||
``` | |||
Renders as a single row: `[☐ Monday Breakfast] [☐ Lunch] [☐ Dinner]` | |||
### `|` (Pipe) – Label-Only (No Checkbox) | |||
Prefix a task label with `|` to render it as **plain text without a checkbox**. Useful for section headers, notes, or informational text within a todo list. | |||
**Behaviour:** | |||
- The `|` prefix is stripped from the displayed label | |||
- No checkbox is rendered | |||
- The item does not count toward the completed/total counter | |||
**Example:** | |||
``` | |||
|Important Notes | |||
Attend all morning sessions | |||
|Evening Activities | |||
``` | |||
Renders as: | |||
``` | |||
Important Notes (plain text, no checkbox) | |||
[☐ Attend all morning sessions] | |||
Evening Activities (plain text, no checkbox) | |||
``` | |||
## Date Variables | |||
Task labels support the `{{EventDate}}` variable, which is replaced with the event's start date displayed as day and month numbers (e.g., `16/06`). | |||
### Basic Usage | |||
| Variable | Replaced With | | |||
|---|---| | |||
| `{{EventDate}}` | Event start date (e.g., `16/06`) | | |||
### Offsets | |||
You can add or subtract days from the event date using `+` or `-`: | |||
| Variable | Replaced With | | |||
|---|---| | |||
| `{{EventDate+1}}` | Event start date + 1 day | | |||
| `{{EventDate-1}}` | Event start date − 1 day | | |||
| `{{EventDate+3}}` | Event start date + 3 days | | |||
| `{{EventDate-2}}` | Event start date − 2 days | | |||
Whitespace inside the braces is tolerated: | |||
- `{{ EventDate + 1 }}` → same as `{{EventDate+1}}` | |||
- `{{EventDate- 2}}` → same as `{{EventDate-2}}` | |||
Unknown variables (anything other than `EventDate`) are left as-is. | |||
**Example:** | |||
``` | |||
{{EventDate}} Check-in at hotel | |||
{{EventDate+1}} Follow-up meeting | |||
``` | |||
Renders as: `16/06 Check-in at hotel`, `17/06 Follow-up meeting` (assuming event starts June 16) | |||
## Combining Prefixes and Variables | |||
Prefixes and date variables can be used together: | |||
``` | |||
|Schedule for {{EventDate}} | |||
Morning briefing | |||
. Afternoon workshop | |||
. Evening networking | |||
``` | |||
--- | |||
Once you're satisfied with this documentation, please **toggle to Act mode** so I can write it to a file for you. | |||