Skip to main content
ansicode

CHT — Cursor Forward Tabulation (CSI I)

Advance the cursor N tab stops — the parameterized form of pressing Tab.

Byte forms

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

\\x1b[\x1b[NI
\\033[\033[1I
\\e[\e[1I
ESC [ESC [ N I
hex1b 5b <N> 49

Description

Cursor Forward Tabulation. Final byte `I` (0x49, uppercase i) moves the cursor forward to the next tab stop, repeated N times (default 1). It is the mirror of CBT (`CSI Ps Z`) and a parameterized form of HT (`\t`, 0x09). The terminfo cap is `cht`. Where HT moves a single tab forward, CHT lets you skip ahead by an arbitrary count without emitting N literal `\t` bytes, which matters in raw mode where `\t` may be consumed by line discipline.

Spec citation: ECMA-48 §8.3.10 (CHT)

Examples

bash
printf 'a\033[3Ib'   # cursor advances 3 tab stops, then writes b
python
import sys; sys.stdout.write('\x1b[3I')
go
fmt.Print("\x1b[3I")
javascript
process.stdout.write('\x1b[3I')
c
printf("\x1b[3I");

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