A real terminal editor. One Nyx file.
About 1090 lines of Nyx, a single source file, zero external dependencies — raw mode, UTF-8, live resize, mouse, bracketed paste, flicker-free rendering and 1000-level undo. Proof that Nyx builds interactive terminal apps, not just servers.
$ curl -sSf https://nyxlang.com/install.sh | sh
The fundamentals, done right
Everything a terminal editor needs to feel solid — the details that separate a toy from something you'd actually type in.
Live resize
Drag the terminal edge and the buffer re-renders instantly — no keypress needed to catch up.
Flicker-free rendering
One buffered write per frame inside a synchronized-output region. No tearing, no flash — even on a slow SSH link.
Codepoint-aware
Cursor movement, editing and rendering all work in codepoints, not bytes — 2–4 byte characters just work.
Click, drag, scroll
Click to position the cursor, drag to select, wheel to scroll. Turned off cleanly on every exit path.
Incremental undo/redo
Per-operation deltas with typing coalescing, up to 1000 levels — a burst of typing collapses into one undo.
Paste stays literal
Multiline pastes are inserted verbatim as a single undo group — no auto-indent mangling your code.
Alternate screen
Your scrollback is intact after you quit, just like vim or less. The editor lives on its own screen.
Search & go-to-line
Incremental search with wrap-around, and jump straight to a line number. The navigation you reach for.
Always restores the terminal
Termios, alternate screen and mouse modes are undone via defer on every exit path — no wrecked shell after a crash.
Install and open a file
nyx-edit is a Nyx program — install the toolchain, build the single binary, run it. No package to manage.
$ curl -sSf https://nyxlang.com/install.sh | sh $ git clone https://github.com/nyxlang-dev/nyx-edit $ cd nyx-edit && nyx build $ ./nyx-edit README.md # opens README.md — arrows to move, Ctrl+S to save, Ctrl+Q to quit
Keybindings
| Key | Action |
|---|---|
| Arrows | Move the cursor |
| Shift + Arrows | Extend selection |
| Ctrl + S | Save file |
| Ctrl + Q | Quit |
| Ctrl + Z / Y | Undo / redo |
| Ctrl + F | Search (wrap-around) |
| Ctrl + G | Go to line number |
| Ctrl + C / X / V | Copy / cut / paste |
| Ctrl + K | Delete current line |
| Home / End | Start / end of line |
| PgUp / PgDn | Page up / down |
| Mouse | Click to position · drag to select · wheel to scroll |
A stress test for the language
A terminal editor is unforgiving: raw byte input, escape sequences, signal handling, tight render loops. nyx-edit is one file of Nyx that does all of it — the same language that writes the compiler, the KV store and the web framework.
Build it and open a file
One clone, one build, and you're editing — with resize, mouse and undo already working.
$ git clone https://github.com/nyxlang-dev/nyx-edit $ cd nyx-edit && nyx build $ ./nyx-edit