TKTuna Kılıç
All projects

termi

A modal terminal code editor in Rust. Small enough to read end to end, with multiple cursors and window splits built into the core rather than bolted on.

PublishedRust · Terminal · Editor

I wanted an editor I could actually read. Helix has the editing model I like, Kilo has the size I like, and termi is my attempt at both at once: modal keys, a codebase you can get through in an afternoon.

It is built on ratatui and crossterm, and it is on crates.io.

cargo install termi

There are prebuilt binaries on the releases page too, for Linux (glibc and static musl), macOS on both architectures, and Windows. Building from source needs Rust 1.88 or newer.

The text layer

Everything is UTF-8, with a ropey rope underneath, so editing a huge file costs about the same as editing a small one. Tabs, wide glyphs and mixed line endings are dealt with at the edges. In between, the code works in plain character indices, which keeps the interesting parts readable.

Editing

Normal, insert, visual, visual line, command and search modes. hjkl and word motions, dd, yy, p, undo and redo with typing merged into steps that feel like one action instead of forty.

Multiple cursors (Alt+Up and Alt+Down) live in the editing core. That was a deliberate call early on. Adding them later, as a separate mode, is where most editors end up with two half working code paths.

Search is incremental, literal or regex, smart case, with matches highlighted while you type. :%s/a/b/g does the obvious thing.

Around the text

Syntax highlighting is regex based and covers Rust, C, C++, Zig, Python and Markdown. Block comment state is cached per line, so scrolling into the middle of a big file does not rescan it from the top.

Files get multiple buffers with a tab strip, a file tree on Ctrl+B that expands lazily, atomic saves, and a watcher that quietly reloads clean buffers when they change on disk and warns instead of clobbering when they are dirty.

Windows split as many ways as you want (Ctrl+W s, Ctrl+W v). A buffer owns the text, the undo history and the highlighting. A window owns a viewport and its cursors. So the same file can sit in two windows at different scroll positions, an edit in one shows up in the other immediately, and there is a single undo stack behind both.

Dark and light themes ship with it, and TOML themes can override only the slots you care about.

Keys

:help inside the editor prints the full list. The short version:

i a o insert
v V visual, visual line
w b e 0 ^ $ gg G motions
x dd yy p u Ctrl+R edit, undo, redo
/ n N search
Alt+↑ Alt+↓ add a cursor
Ctrl+B file tree
Ctrl+W s v split
Ctrl+S Ctrl+Q save, quit