# Vertical Tab (VT)

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

- **Sequence:** `VT`
- **ECMA-48:** [§8.3.161 VT – Line Tabulation, p. 74](https://archive.org/details/ecma-48-5th-edition-june-1991/page/n87/mode/1up)
- **DEC STD 070:** [§5.4.4 Vertical Tab, p. 5-61](https://archive.org/details/bitsavers_decstandar0VideoSystemsReferenceManualDec91_74264381/page/n315/mode/1up)
- **VT220:** [§4.2 Control Characters](https://vt100.net/docs/vt220-rm/chapter4.html#S4.2)
- **VT510:** [4.2 Control Characters](https://vt100.net/docs/vt510-rm/chapter4.html#S4.2)

On a terminal, VT (`0B`) is a [line feed](https://control-codes.page/c0/lf/index.html.md): 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](https://control-codes.page/ansi/lnm/index.html.md)) 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

| Terminal | Version | Support | Notes |
| --- | --- | --- | --- |
| VT220 | [manual](https://vt100.net/docs/vt220-rm/), 2nd ed., 1984 | Yes | [§4.2 Control Characters](https://vt100.net/docs/vt220-rm/chapter4.html#S4.2) |
| VT510 | [manual](https://vt100.net/docs/vt510-rm/), 1st ed., 1993 | Yes | [Table 4–1](https://vt100.net/docs/vt510-rm/chapter4.html#T4-1) |
| xterm | patch 412, [xterm-411a](https://github.com/ThomasDickey/xterm-snapshots/tree/xterm-411a) | Yes | processed as LF |
| libghostty-vt | [0f171f6](https://github.com/ghostty-org/ghostty/tree/0f171f650a1cbbd6df4a2573b6b0c7de57cc6d90) | Yes | processed as LF |
| kitty | 0.49.1, [run in a VM](https://git.jcollie.dev/jeff/control-codes/src/branch/main/emulators/results/kitty.json) | Yes | passes the 3 cases that show it working |
| foot | 1.28.0, [run in a VM](https://git.jcollie.dev/jeff/control-codes/src/branch/main/emulators/results/foot.json) | Partly | fails VT-3 of the 3 cases that show it working |
| pyte | 0.8.2, [run as a library](https://git.jcollie.dev/jeff/control-codes/src/branch/main/emulators/results/pyte.json) | Yes | passes the 3 cases that show it working |
| xterm.js headless | 6.0.0, [run as a library](https://git.jcollie.dev/jeff/control-codes/src/branch/main/emulators/results/xtermjs.json) | Yes | passes the 3 cases that show it working |
| alacritty_terminal | 0.26.0, [run as a library](https://git.jcollie.dev/jeff/control-codes/src/branch/main/emulators/results/alacritty.json) | Partly | fails VT-3 of the 3 cases that show it working |
| rxvt-unicode | 9.31, [run in a VM](https://git.jcollie.dev/jeff/control-codes/src/branch/main/emulators/results/urxvt.json) | Partly | fails VT-3 of the 3 cases that show it working |
| VTE | 0.84.1, [run as a library](https://git.jcollie.dev/jeff/control-codes/src/branch/main/emulators/results/vte.json) | Partly | fails VT-3 of the 3 cases that show it working |

## Validation

### VT-1: Down, not back

Input, one step per line:

```text
AB
\v
C
```

Expected screen:

```text
|AB___|
|__C__|
|_____|
cursor 2,4
```

### VT-2: Scrolls at the bottom

Input, one step per line:

```text
A\r\nB\r\nC
\v
D
```

Expected screen:

```text
|B____|
|C____|
|_D___|
```

### VT-3: With line feed/new line mode

Input, one step per line:

```text
\e[20h    # LNM
AB
\v
C
\e[20l
```

Expected screen:

```text
|AB___|
|C____|
cursor 2,2
```

---

This is the Markdown version of <https://control-codes.page/c0/vt/>. On that page every validation case runs live in libghostty-vt, the terminal emulation core of Ghostty, compiled to WebAssembly.

The validation cases are written in the notation described in <https://control-codes.page/notation/index.html.md>.
