new_nano
A fork of GNU nano that adds keyboard-driven autocomplete — Ctrl+Space opens a suggestion window, arrow keys pick a word.
2025 · Systems · shipped
A small convenience added to my favorite text editor. new_nano is a fork
of GNU nano with one new feature: press Ctrl+Space while
editing and a suggestion window opens with matching tokens from the open
buffer. Arrow keys cycle through completions; Enter commits one.
Why nano
Nano is the editor I actually use. Vim and Emacs have first-class completion via plugins; nano didn't have anything I liked. Forking the canonical source — rather than writing a wrapper or starting from scratch — forced me to read a large, mature C codebase: how it manages buffers, how it routes key bindings, how it talks to the terminal through ncurses.
What changed
The patch lives close to the input loop. When the autocomplete keychord fires, the editor scans the current buffer for tokens prefix-matching the word under the cursor, opens a small ncurses sub-window with the matches, and routes subsequent arrow keys to that window instead of the main edit buffer until the user commits or cancels.
It is the kind of change that's small in lines and large in understanding of someone else's program. That was the point of the exercise.
CncursesGNU Autotoolstext-editorncursesautocompletefork