Skip to main content
ansicode

VPA — Vertical line position absolute (CSI d)

Move the cursor to an absolute row, keeping the current column.

Byte forms

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

\\x1b[\x1b[<row>d
\\033[\033[3d
\\e[\e[3d
ESC [ESC [ row d
hex1b 5b ... 64

Description

Vertical Position Absolute. Move the cursor to row `<row>` (1-based) without changing the column — the row-only counterpart of CHA (`\x1b[<col>G`, cursor-column). Default row is 1 if omitted (`\x1b[d`). Out-of-range values clamp to the visible region (or the DECSTBM scrolling region when DECOM is active). VPA's column-preserving behaviour makes it the right primitive when redrawing a status bar or progress line at a known row while the user types in the column above — CUP (`\x1b[r;cH`) would reset the column to 1. Less commonly used than CUP / CUU / CUD because most TUIs prefer absolute (row, col) pairs, but it's part of every ECMA-48-conformant terminal.

Spec citation: ECMA-48 §8.3.158 (VPA) / xterm-ctlseqs

Examples

bash
printf '\033[24dstatus: ok'   # jump to row 24, keep column
python
import sys; sys.stdout.write('\x1b[24dstatus: ok')
go
fmt.Print("\x1b[24dstatus: ok")
javascript
process.stdout.write('\x1b[24dstatus: ok')
c
printf("\x1b[24dstatus: ok");

Terminal support

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

Related sequences

In the family cookbook

CSI cookbook · 2. Cursor movement — CUU / CUD / CUF / CUB + CUP + CHA / VPA