Built-ins behave like the manual says. Where DECTPU was missing pieces,
VX/TPU adds them – without losing the script-level compatibility you
have under EVE.
🖥️
Multi-window layout
Horizontal and vertical splits, per-window status lines, CREATE_WINDOW,
MAP/UNMAP, ADJUST_WINDOW, plus Ctrl-O
and Ctrl-N shortcuts.
🔍
Pattern engine
ANCHOR, ANY, NOTANY, ARB,
SCAN/SCANL, SPAN/SPANL,
LINE_BEGIN, LINE_END, PAGE_BREAK,
REMAIN, UNANCHOR. Composed with + and &.
⌨️
Real key maps
CREATE_KEY_MAP, CREATE_KEY_MAP_LIST,
ADD_KEY_MAP, per-buffer
SET (KEY_MAP_LIST), GOLD prefix, custom shift key,
PRE/POST_KEY_PROCEDURE.
📋
First-class types
PATTERN, RANGE, MARKER,
BUFFER, ARRAY, PROGRAM,
LEARN, PROCESS. Assign them, return them,
pass them to procedures.
🧠
Real language
IF/THEN/ELSE/ENDIF, LOOP/EXITIF/ENDLOOP,
PROCEDURE with parameters, LOCAL declarations,
ON_ERROR handlers, ! comments, -
line continuation.
🛠️
FAO that works
Strings !AS, signed !SL, unsigned !UL,
hex !XL, octal !OL, binary !BL,
padded !nZL, plural !%S, date !%D,
time !%T.
📐
Margins & wrap
SET (LEFT_MARGIN), SET (RIGHT_MARGIN),
SET (MARGINS), SET (TAB_STOPS),
SET (WRAP) with auto-wrap on type, tab-stop expansion
on Tab.
🖱️
Mouse, timers, hooks
SET (MOUSE), LOCATE_MOUSE,
SET (TIMER, ms, "stmt"),
UNDEFINED_KEY, SHIFT_KEY.
🔗
External processes
CREATE_PROCESS("sort", out), SEND,
SEND_EOF, ATTACH. Output streams
non-blockingly into a buffer.
📓
Journals & learn
JOURNAL_OPEN, JOURNAL_CLOSE,
RECOVER_BUFFER, LEARN_BEGIN,
LEARN_END returns a replayable LEARN value.
🧪
Headless test mode
tpu --test file.tpu runs your TPU code without the screen,
with built-in ASSERT, ASSERT_EQ, and
TEST sections. CI-friendly.
🪟
Linux · macOS · Windows
One C++17 file. ncurses on POSIX, PDCurses on Windows.
Tested under bash, zsh, and
PowerShell 7.
↩️
Undo / redo
Per-buffer 200-snapshot undo stack. UNDO,
REDO, plus GOLD-U / GOLD-R.
Read-only commands never invalidate the redo history.
📦
Box selection
Rectangular selection: BOX SELECT,
BOX CUT, BOX COPY,
BOX PASTE. Renders as a real rectangle with the
same selection machinery.
🔎
Live incremental find
Ctrl-F jumps to the first hit as you type.
Ctrl-F again advances; Esc restores the
original cursor. No popup; the message line is the prompt.
📋
System clipboard
WRITE_CLIPBOARD, READ_CLIPBOARD wrap
pbcopy/pbpaste,
wl-copy/wl-paste,
xclip/xsel, and the Win32 clipboard.
🧩
CALL_USER → dlopen
CALL_USER(symbol, arg [, library]) loads a shared
object (dlopen/LoadLibrary) and calls
const char* fn(const char*), returning the
result as a string.
🚦
Reload & backups
Captures file mtime on load. RELOAD /
CHECK_DISK detect on-disk changes. WRITE_FILE
renames the existing file to .bak first
(toggle with SET (BACKUP, OFF)).
🎨
Video regions
SET (VIDEO, range, BOLD|REVERSE|UNDERLINE|...)
paints ncurses attributes over a Range – the foundation for
syntax highlighting hooks driven from TPU code.
📜
Persistent startup file
$TPU_STARTUP or ~/.tpurc is auto-COMPILEd
at boot. Bind keys, define procedures, set margins – all your
customisations load automatically.
📰
Custom status lines
SET (STATUS_LINE, win, "TEXT", " %n %m %l/%t :%c %d ")
– %n name, %f file, %l/%t
line/total, %c column, %m modified,
%i insert mode, %d direction.
🔢
Numeric base literals
Real DECTPU numeric literals: %X1A,
%XFF, %O17, %B1010,
%D42. Mix with the standard decimal literals.
📚
Help in many shapes
Inside the editor, HELP opens a system buffer.
From a script, HELP_TEXT(topic) returns the body
as a string. 17 topic sections.
📝
MESSAGE_BUFFER scrollback
Every MESSAGE appends to
$MESSAGE_BUFFER, capped at 1000 lines. Visit it
with BUFFER $MESSAGE_BUFFER to see history.
⚠️
Compile-time errors
Each Stmt carries its source line. Unknown commands report
"Unknown command: foo (line 27)"; missing
ENDPROCEDURE is recorded in
parser.compile_diagnostics.
📊
SHOW everything
SHOW BUFFERS, KEYMAPS,
KEY_MAP_LISTS, PROCEDURES,
VARIABLES, DEFAULTS,
SUMMARY, SYSTEM,
KEY [name].