Skip to main content

DECCOLM

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

DECCOLM (Mode 3) is a DECSET/DECRST mode that switches the terminal between 132-column and 80-column display widths.

Syntax​

CSI ? 3 h    DECSET — Switch to 132 columns
CSI ? 3 l DECRST — Switch to 80 columns
Formal syntax
DECSET-mode3 = 0x1b, "[", "?", "3", "h" ;
DECRST-mode3 = 0x1b, "[", "?", "3", "l" ;

Description​

Per the VT100 User Guide and VT510 Programmer Reference, DECCOLM controls the number of columns displayed on the screen.

  • Set — The terminal switches to 132 columns per line.
  • Reset — The terminal switches to 80 columns per line. This is the default.

Side effects​

Toggling DECCOLM has significant side effects:

  • The screen is cleared (equivalent to ED 2)
  • The cursor moves to the home position (row 1, column 1)
  • The scrolling margins (DECSTBM) are reset to the full screen
  • If DECOM (origin mode) is set, the cursor moves to the home position within the scrolling region

These side effects occur on both set and reset transitions, making DECCOLM a common way to perform a "soft reset" of the display in legacy applications.

note

Many modern terminal emulators allow the window to be resized freely and may ignore or restrict DECCOLM. XTerm requires the allowColumnMode resource to be enabled for DECCOLM to function. In terminals that support it, the actual column count may be adjusted by resizing the window rather than changing the font.

Examples​

printf '\e[?3h'      # Switch to 132-column mode
printf '\e[?3l' # Switch to 80-column mode

# Note: both commands clear the screen as a side effect

Specifications​

SpecificationSection
VT510 Reference—

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoReported as not supported; clears grid but doesn't change width
Bobcat??Not explicitly configured in Bobcat. TerminalCtrl may support this, but cannot confirm from Bobcat's code.
contour✓v0.1.0DECCOLM (mode 3 - 132/80 column switching) implemented as DECMode::Columns132 in primitives.h line 615, requires AllowColumns80to132 mode enabled (line 685)
foot✗No
Ghostty✓v1.0.0132/80 column switching
iTerm2✓Yes132/80 column switching, requires allowColumnMode enabled
Kitty✓Yes
Konsole✓Yes80/132 column switching supported with MODE_Allow132Columns guard
mintty✓YesDECCOLM (Mode 3) implemented at src/termout.c:2397-2409. Can be disabled via mode 40
mlterm✓YesRequires ALLOW_DECCOLM flag to be enabled
PuTTY✓0.45132/80 column switching at terminal.c:3073-3082; can be disabled via no_remote_resize config
Rio??
rxvt-unicode✓1.2PrivMode_132 - 132/80 column switching
st✗NoExplicitly marked as IGNORED in st.c:1501
terminology~v0.1.0Requires SUPPORT_80_132_COLUMNS compile flag
VT100✓Yes
VTE✓YesDEC_132_COLUMN mode; controlled by XTERM_DECCOLM flag
WezTerm✓Yes132/80 column switching
Windows Terminal✓YesRequires XTERM_EnableDECCOLMSupport mode 40 to be enabled
xterm✓xterm-1DECCOLM (mode 3) - 132/80 column switching. Requires c132 resource and allowWindowOps
xterm.js✓0.10Requires windowOptions.setWinLines enabled
Multiplexers
cy✗NoExplicitly ignored
GNU Screen✓v.4.2.0132/80 column mode switching (src/ansi.c:1095-1101)
tmux✓1.7Side-effect only: clears screen
tuios✗No
Zellij~v0.31.2Only side effects implemented (clear screen, reset cursor), not actual column switching

See also​