Preview

Defines the format string used to generate the preview pane, which provides a detailed view of the selected task. You can use placeholders to include dynamic content based on task attributes and apply text styling with the new format syntax.

Formatting Rules

Text Colors: Enclose text in [...] and specify the style in parentheses. As style you can use any color definition from Colors

Examples:

  • [some text](Red) sets the text to have a red foreground.
  • [some text](^Red) sets the text to have a red background.
  • [some text](Blue Bold) sets the text to have a bold, blue foreground.

Dynamic Variables: Insert task-specific values using $name. You can use the following variables to represent task attributes:

VariableDescription
$pendingThe number of pending tasks.
$doneThe number of completed tasks.
$subjectThe subject of the task.
$priorityThe task's priority. If used as priority:A, it specifies a particular priority. If omitted, it uses the task's default priority.
$custom_categoryThe task's custom category. If used as custom_category:+project, it specifies a particular custom category. If omitted, it uses the task's default custom category.
$create_dateThe creation date of the task.
$finish_dateThe finish date of the task.
$finishedIndicates whether the task is finished (true or false).
$threshold_dateThe threshold date of the task.
$due_dateThe due date of the task.
$contextsThe contexts associated with the task.
$projectsThe projects associated with the task.
$hashtagsThe hashtags associated with the task.
otherSpecial values for custom key-value pairs in the todo.txt format.

It is also possible to use ! to enforce category colors.

Example format string:

[Pending: $pending](#ff0000) [Done: $done](^Green)
[Subject: $subject](! priority)
[Priority: $priority](priority:A)
[Created: $create_date](^Yellow)
[Link: $link](^9)

This example configures the preview pane with styled text for pending and completed tasks, task details, and dynamic values based on attributes.

Options

Flag: -p, --preview-format
Env: $TODOTXT_TUI_PREVIEW_FORMAT
Conf: preview_format

Defines the format string used to generate the preview pane, which provides a detailed view of the selected task. Placeholders allow dynamic content customization based on task attributes. Format description is above.

default:

Pending: $pending Done: $done
Subject: $subject
Priority: $priority
Create date: $create_date
Link: $link"""

Flag: -w, --wrap-preview
Env: $TODOTXT_TUI_INIT_WIDGET
Conf: wrap_preview
Determines whether the text in the preview pane should wrap to fit the available display width. When enabled, long lines are broken into multiple lines for better readability.

default: true