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
$pendingNumber of pending tasks.
$doneNumber of completed tasks.
$subjectTask subject.
$priorityTask priority.
$create_dateTask creation date.
$finish_dateTask finish date.
$finishedTask finished status (true or false).
$threshold_dateTask threshold date.
$due_dateTask due date.
$contextsTask contexts.
$projectsTask projects.
$hashtagsTask hashtags.
otherSpecial values for custom key-value pairs in the todo.txt format

Example format string:

[Pending: $pending](#ff0000) [Done: $done](^Green)
[Subject: $subject](Blue Bold)
[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