Skip to main content
ansicode

DECSCPP — Select columns per page (CSI Pn $ |)

Resize the active page to 80 or 132 columns — the data-side request that DECCOLM expresses as a private mode toggle.

Byte forms

Every common string-literal form so you can paste-and-search either direction.

\\x1b[\x1b[80$| (80 cols) \x1b[132$| (132 cols)
\\033[\033[80$| / \033[132$|
\\e[\e[80$| / \e[132$|
ESC [ESC [ Pn $ |
hex1b 5b 38 30 24 7c / 1b 5b 31 33 32 24 7c

Description

Set Columns Per Page. DEC VT400 / VT520 sequence with intermediate byte $ (0x24) and final | (0x7c). Pn=80 (or omitted) requests 80-column mode; Pn=132 requests 132-column mode. Any other value is silently ignored. DECSCPP is the parameterised cousin of DECCOLM (\x1b[?3h/l, slug deccolm): both ultimately ask the terminal to change page width, but DECCOLM is a fixed two-state toggle while DECSCPP carries an explicit column count. The two share these implementation-defined side effects:

- The screen is cleared (filled with spaces using the current SGR background). - The cursor is homed to row 1 / column 1. - Scrolling region (DECSTBM) and horizontal margins (DECSLRM) are reset to full-page.

These side effects are the historical reason resize-aware programs send DECCOLM/DECSCPP only at terminal-init time and never inside a TUI render loop — flipping width nukes the visible buffer. Modern emulators almost universally honour DECSCPP only when DECCOLM is also enabled at config time (xterm's allowC132 / c132 resources, gnome-terminal's allowAlternateScreen). When disabled, the sequence is silent-ignored — the same conservative posture as DECCOLM. The intermediate-byte trap: CSI Pn | (no $) is DECTABSR / DECTSR depending on context, not DECSCPP — the $ distinguishes the column-set sequence from the tab-stop / status-report family.

Spec citation: DEC VT400 (DECSCPP) / xterm-ctlseqs

Parameters

PnColumn count. 80 (or omitted) selects 80-column mode; 132 selects 132-column mode. Other values are ignored.

Examples

bash
# Request 132-column wide mode for a log dump:\nprintf '\033[132$|'   # screen clears, cursor homes\ncat very-wide-output.log\nprintf '\033[80$|'    # restore 80-col on exit
python
import sys\nsys.stdout.write('\x1b[132$|')   # widen\ntry:\n    render_wide_table()\nfinally:\n    sys.stdout.write('\x1b[80$|')
go
fmt.Print("\x1b[132$|")   // wide\ndefer fmt.Print("\x1b[80$|")   // narrow back
javascript
process.stdout.write('\x1b[132$|')\nprocess.on('exit', () => process.stdout.write('\x1b[80$|'))
c
printf("\x1b[132$|");   /* 132 cols — clears screen, homes cursor */\nprintf("\x1b[80$|");    /* back to 80 */

Terminal support

xterm
yes
Linux console (fbcon)
no
macOS Terminal.app
no
iTerm2
no
Windows Terminal
no
cmd.exe / ConPTY
no
kitty
no
alacritty
no
WezTerm
no
Ghostty
no
GNOME Terminal
partial
Konsole
partial
tmux
yes
GNU screen
yes

Related sequences