DECCOLM — 80 / 132 column mode (CSI ? 3 h / l)
Toggle between 80 and 132 column page width — DEC VT100's flagship 'wide mode' switch, gated by an opt-in resource on every modern emulator.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[?3h (132 cols) \x1b[?3l (80 cols)\033[?3h / \033[?3l\e[?3h / \e[?3lESC [ ? 3 h / ESC [ ? 3 l1b 5b 3f 33 68 / 6cDescription
Column Mode (DECCOLM, private mode 3). Set (`\x1b[?3h`) requests 132-column page width; reset (`\x1b[?3l`, the typical default) returns to 80 columns. Originally a hardware feature of the DEC VT100 — flipping this triggered a real font / clock-rate switch that physically narrowed each character cell so 132 glyphs fit on the same CRT. Software emulators implement it by resizing the page buffer; the side effects are the same as DECSCPP and intentional: - **Screen cleared** to current SGR background. - **Cursor homed** to (1, 1). - **DECSTBM and DECSLRM reset** to full-page. - Any pending **DECOM** (origin mode) state preserved but margins re-anchored. Why the resource gate? In the X11 / VT100 era, applications would emit `?3h` programmatically to gain wide-display real estate, surprising the user by clearing their buffer. Modern emulators (xterm `allowC132`, putty `disable_remote_resize`, others by default) suppress DECCOLM unless explicitly opted in. Result: a program that ships `?3h` today gets silent no-ops on alacritty / kitty / wezterm / ghostty / Windows Terminal — the safe assumption is that DECCOLM does nothing unless you've already verified it works in the target environment. Use DECCOLM (or its parameter-bearing cousin DECSCPP) only when you control the terminal config; otherwise emit a `resize`-style request through your platform's window-management protocol (e.g. ioctl `TIOCSWINSZ`). DECCOLM **persists** until reset or until DECSTR (soft reset returns it to default) or RIS (hard reset).
Spec citation: DEC VT100 (DECCOLM) / xterm-ctlseqs
Parameters
Examples
# Probe and request 132-col, fall back gracefully:\nprintf '\033[?3h' # request wide\nprintf '\033[6n' # cursor position report\nIFS='[;R' read -t 0.05 -rsd R _ rows cols < /dev/tty || true\nif [ "$cols" -lt 100 ]; then echo "emulator ignored DECCOLM"; fiimport sys, os\nsys.stdout.write('\x1b[?3h') # ask for 132\nsys.stdout.flush()\nrows, cols = os.get_terminal_size()\nif cols < 100:\n print('DECCOLM not honoured — staying narrow')fmt.Print("\x1b[?3h")\ndefer fmt.Print("\x1b[?3l") // always restore — clears screen on transitionprocess.stdout.write('\x1b[?3l') // explicit 80-col (default; harmless on emulators that ignore DECCOLM)printf("\x1b[?3h"); /* request 132 cols */\n/* WARNING: screen now cleared. Re-render entire UI. */Terminal support
- xterm
- yes
- Linux console (fbcon)
- no
- macOS Terminal.app
- partial
- iTerm2
- partial
- Windows Terminal
- no
- cmd.exe / ConPTY
- no
- kitty
- no
- alacritty
- no
- WezTerm
- no
- Ghostty
- no
- GNOME Terminal
- partial
- Konsole
- partial
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | no | partial | partial | no | no | no | no | no | no | partial | partial | no | no |