Skip to content

Text Formatting ​

Text can be formatted in Halloy by using the /format (or /f) command.

Attributes ​

Below is a table with the supported text attributes.

ActionMarkdownToken
Italics_italic text_$iitalic text$i
Bold__bold text__$bbold text$b
Italic and Bold___italic and bold___$b$iitalic and bold$i$b
Strikethrough~~strikethrough~~$sstrikethrough$s
Underline-$uunderline$u
Code`code`$mcode$m
Spoiler||spoiler||-
Link[1]<url>-

Markdown formatting characters can be escaped with \, but backslashes alone do not need escaping.

Example

/format __this is bold__ $iand this is italic$i and \*this is escaped\*

Will render the following:

this is bold and this is italic and *this is escaped*

Color ​

ActionToken
Text color (fg)$c0
Text and background (fg & bg)$c0,1
End color$c

The number next to the $c token indicates the color. For a comprehensive list of all numbers, see the following ircdocs.horse documentation. Below, the first 00 to 15 colors are defined and have been assigned aliases for convenience.

Colors

- 00 - white
- 01 - black
- 02 - blue
- 03 - green
- 04 - red
- 05 - brown
- 06 - magenta
- 07 - orange
- 08 - yellow
- 09 - lightgreen
- 10 - cyan
- 11 - lightcyan
- 12 - lightblue
- 13 - pink
- 14 - grey
- 15 - lightgrey

The colors shown here are the defaults. They can be customized by theme.

Example

/format $cred,lightgreenfoobar$c
/format $c04,09foobar$c

Will both render the following:

foobar

Reset ​

When using token-based formatting, the token $r will reset formatting back to plain text (i.e. remove all active formatting from where it is to the end of the message). For example,

/format testing $i$bbold-italic$r then not

will render as

testing bold-italic then not

Configuration ​

By default, Halloy will only format text when using the /format command. This, however, can be changed with the auto_format configuration option:

toml
[buffer.text_input]
auto_format = "disabled" | "markdown" | "all"

Token-based formatting is included in "all", in addition to Markdown formatting, which provides underline and color formatting that "markdown" does not.

When auto_format is enabled, it can be disabled for an individual message by using the /plain command.


  1. The text inside link brackets < and > will not be formatted by Halloy (e.g. _'s will not start/stop italics). However, whether the interior text is parsed as a URL or not is up to the rendering client. ↩︎