^[control-codes
live in libghostty-vt

Escape sequences

HTS Horizontal Tabulation Set

View as Markdown

Set a tab stop at the cursor's column.

ESC H
ECMA-48
§8.3.62 HTS – Character Tabulation Set, p. 46
DEC STD 070
§5.4.5 Horizontal Tabulation Set, p. 5-69
VT220
§4.8 Tab Stops
VT510
HTS—Horizontal Tab Set

Set a horizontal tab stop at the column the cursor is in. The cursor does not move, and the other tab stops are not affected. The next HT or CHT from left of that column stops there.

HTS is a C1 control. ECMA-48 defines it both as the single byte 88 and as ESC H, and the VT510 manual accepts either. libghostty-vt decodes its input as UTF-8, so it accepts only ESC H: a lone 88 byte is not valid UTF-8 and is printed as U+FFFD, the replacement character, and the code point U+0088 sent as UTF-8 is ignored.

TBC clears tab stops, one or all of them.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Yes§4.8 Tab Stops
VT510manual, 1st ed., 1993YesHTS
xtermpatch 412, xterm-411aYes
libghostty-vt0f171f6YesESC H only; U+0088 is ignored
pyte0.8.2, run as a libraryYespasses the 3 cases that show it working
xterm.js headless6.0.0, run as a libraryYespasses the 3 cases that show it working
alacritty_terminal0.26.0, run as a libraryYespasses the 3 cases that show it working
ConEmubuild 230724, its documentationNonot in ConEmu’s ANSI escape codes
rxvt-unicode9.31, run in a VMYespasses the 3 cases that show it working
VTE0.84.1, run as a libraryYespasses the 3 cases that show it working

Validation

HTS-1: Set a stop

\e[?5W    # reset tab stops: 9 and 17
\e[1;5H
\eH
\e[1;1H
\tX
|____X_______________|

HTS-2: The other stops stay

\e[?5W    # reset tab stops: 9 and 17
\e[1;5H
\eH
\e[1;1H
\t\tX     # 5, then 9
|________X___________|

HTS-3: After clearing every stop

\e[3g     # clear every tab stop
\e[1;12H
\eH
\e[1;1H
\tX
|___________X________|

HTS-4: The 8-bit form, sent as UTF-8

\e[3g      # clear every tab stop
\e[1;12H
\u{88}     # U+0088 is HTS in 8 bits; ignored
\e[1;1H
\tX        # no stop was set
|___________________X|
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.