C++17 · ncurses · AGPL-3.0

ste

A minimal terminal text editor with a two-mode workflow, stripped down to the smallest useful set of behavior. Configured the suckless way: edit config.h, recompile.

$ git clone https://github.com/fuewwa/ste.git && cd ste && make

# Try it

A tiny in-browser replica. Click the terminal and use the real key bindings (They're can be old).

ste demo.cpp
GENERAL demo.cpp 1:1
w write mode Esc general mode s save q quit arrows move

# Why ste

Small on purpose. Everything you need to edit a file, nothing you have to learn twice.

2

Two modes

General mode for commands, write mode for typing. The cursor changes shape so you always know where you are.

.h

Compile-time config

No runtime configuration. Copy config.def.h to config.h, tweak, rebuild, done.

1

Single binary

Plain C++17 and ncurses. One make produces one executable in the project root.

▮

Visible mode

Solid block in general mode, thin bar in write mode via DECSCUSR, plus a status line as a fallback.

# Modes

Start in general, press w to write, Esc to come back.

general mode

Solid block cursor. Letters trigger commands, they never insert text.

qquit ste
wswitch to write mode
ssave the file
arrowsmove the cursor

write mode

Thin bar cursor. Every printable character is inserted at the cursor.

Escback to general mode
Backspacedelete before the cursor
Enterinsert a new line
Tabinsert spaces (see config.h)
arrowsmove the cursor

The status line at the bottom always shows the mode, file name, unsaved-changes flag and the one-indexed line:col position.

# Build & install

You need a C++17 compiler and the ncurses development headers.

Install dependencies

$ sudo apt install build-essential libncurses-dev
$ sudo pacman -S base-devel ncurses

First line for Debian/Ubuntu, second for Arch Linux.

Build

$ make

If config.h is missing, it is copied from config.def.h. An existing one is never overwritten. Delete it and run make again to reset.

Install (optional)

$ sudo make install

Default destination is /usr/local/bin/ste.

Run

$ ste notes.txt

An existing file is opened. A missing one starts as an empty buffer and is created on first save.