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[1IESC [
ESC [ N Ihex
1b 5b <N> 49Description
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
printf 'a\033[3Ib' # cursor advances 3 tab stops, then writes bimport sys; sys.stdout.write('\x1b[3I')fmt.Print("\x1b[3I")process.stdout.write('\x1b[3I')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
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| yes | yes | yes | yes | yes | partial | yes | yes | yes | yes | yes | yes | no | no |