DECDC / DECIC — Delete / insert column (CSI Pn ' ~ / CSI Pn ' })
Delete (DECDC) or insert (DECIC) Pn columns at the cursor — the column-oriented counterparts of DL (CSI Pn M) and IL (CSI Pn L).
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[<Pn>'~ (DECDC) \x1b[<Pn>'} (DECIC)\033[1'~ / \033[1'}\e[1'~ / \e[1'}ESC [ Pn ' ~ / ESC [ Pn ' }1b 5b ... 27 7e / 1b 5b ... 27 7dDescription
DEC VT520+ rectangular editing primitives. DECDC (\x1b[<Pn>'~) deletes Pn columns starting at the cursor column — every cell to the right of the deletion shifts left by Pn, and the rightmost Pn columns are filled with blanks using the current SGR background. DECIC (\x1b[<Pn>'}) is the inverse — Pn blank columns are inserted at the cursor column, shifting existing content rightward and discarding whatever falls off the right edge. Both honour DECSTBM (vertical scroll region) and DECSLRM (horizontal scroll region) when those are active, so editing happens within the active rectangle rather than the whole screen. Note the intermediate byte: literal apostrophe ' (0x27) between parameter and final byte — easy to omit when hand-typing. Defaults to Pn=1. Support is thin outside xterm and wezterm — many emulators (alacritty, ghostty, kitty's main mode) ignore them. Used historically by VT520 spreadsheet / form editors; modern TUIs almost universally redraw instead.
Spec citation: DEC VT520 RM (DECDC / DECIC) / xterm-ctlseqs
Parameters
| Pn | Number of columns to delete (DECDC) or insert (DECIC). Default 1. |
Examples
printf '\033[3\x27~' # DECDC: delete 3 cols at cursor (note literal ' before ~)import sys; sys.stdout.write("\x1b[2'}") # DECIC: insert 2 blank colsfmt.Print("\x1b[1'~") // DECDC: delete 1 colprocess.stdout.write("\x1b[5'}") // DECIC: insert 5 colsprintf("\x1b[1'~"); /* DECDC: delete one column at cursor */Terminal support
- xterm
- yes
- Linux console (fbcon)
- no
- macOS Terminal.app
- no
- iTerm2
- partial
- Windows Terminal
- no
- cmd.exe / ConPTY
- no
- kitty
- no
- alacritty
- no
- WezTerm
- yes
- Ghostty
- no
- GNOME Terminal
- no
- Konsole
- partial
- tmux
- yes
- GNU screen
- yes
| 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 | no | partial | no | no | no | no | yes | no | no | partial | yes | yes |