^[control-codes
live in libghostty-vt

C0 control characters

VT Vertical Tab

View as Markdown

Move the cursor down one line, exactly as a line feed does.

VT
ECMA-48
§8.3.161 VT – Line Tabulation, p. 74
DEC STD 070
§5.4.4 Vertical Tab, p. 5-61
VT220
§4.2 Control Characters
VT510
4.2 Control Characters

On a terminal, VT (0B) is a line feed: the cursor moves down one line in the same column, and the scrolling region scrolls up if the cursor was on the bottom margin. With line feed/new line mode (LNM) set, it also returns to the first column, as a line feed does.

That is not what the standard says. ECMA-48 calls it LINE TABULATION, and defines it as a move down to the next line tabulation stop, a vertical counterpart of HT. Terminals have no line tabulation stops. DEC STD 070 calls a terminal’s VT a “fallback implementation”, there for compatibility with output meant for printers, and recommends that software send a line feed instead. The VT510 manual says only that it is “treated as LF”.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Yes§4.2 Control Characters
VT510manual, 1st ed., 1993YesTable 4–1
xtermpatch 412, xterm-411aYesprocessed as LF
libghostty-vt0f171f6Yesprocessed as LF
kitty0.49.1, run in a VMYespasses the 3 cases that show it working
foot1.28.0, run in a VMPartlyfails VT-3 of the 3 cases that show it working
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 libraryPartlyfails VT-3 of the 3 cases that show it working
rxvt-unicode9.31, run in a VMPartlyfails VT-3 of the 3 cases that show it working
VTE0.84.1, run as a libraryPartlyfails VT-3 of the 3 cases that show it working

Validation

VT-1: Down, not back

AB
\v
C
|AB___|
|__C__|
|_____|
cursor 2,4

VT-2: Scrolls at the bottom

A\r\nB\r\nC
\v
D
|B____|
|C____|
|_D___|

VT-3: With line feed/new line mode

\e[20h    # LNM
AB
\v
C
\e[20l
|AB___|
|C____|
cursor 2,2
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.