v0.2.0 · now available
 █████╗ ██╗  ██╗██╗ ██████╗ ███╗   ███╗
██╔══██╗╚██╗██╔╝██║██╔═══██╗████╗ ████║
███████║ ╚███╔╝ ██║██║   ██║██╔████╔██║
██╔══██║ ██╔██╗ ██║██║   ██║██║╚██╔╝██║
██║  ██║██╔╝ ██╗██║╚██████╔╝██║ ╚═╝ ██║
╚═╝  ╚═╝╚═╝  ╚═╝╚═╝ ╚═════╝ ╚═╝     ╚═╝

A minimal terminal text editor. No dependencies. Just C.

get axiom view on github
axiom — axiom.c
[1] axiom.c [2] main.py [3] config.rs
[1/3] axiom.c · Ctrl-→ = next buffer · Ctrl-T = new
1/* Axiom — a minimal terminal text editor */
2#include <termios.h>
3#include <unistd.h>
4
5#define AXIOM_TAB_STOP 8
6
7void enableRawMode() {
8 struct termios raw = E.orig_termios;
9 raw.c_lflag &= ~(ECHO | ICANON);
10 tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
11 write(STDOUT_FILENO, "\x1b[?1000h", 8);
12}
13
14int main(int argc, char *argv[]) {
15 enableRawMode();
16 initEditor();
17 if (argc >= 2) editorOpen(argv[1]);
18 while (1) {
19 editorRefreshScreen();
20 editorProcessKeypress();
21 }
22}
[1/3] axiom.c — 1640 lines c | 15/1640
HELP: Ctrl-S = save | Ctrl-Q = quit | Ctrl-F = find | Ctrl-K = select | Ctrl-C = copy | Ctrl-V = paste
get started

Install Axiom

Three ways to get Axiom running. Pick what works for your setup.

$ curl -L https://github.com/ovenpickled/axiom/releases/latest/download/axiom-linux-x86_64 -o axiom
$ chmod +x axiom && sudo mv axiom /usr/local/bin/
$ axiom myfile.c

Also available: axiom-linux-aarch64 · axiom-macos-x86_64 · axiom-macos-aarch64 — see the releases page.

$ git clone https://github.com/ovenpickled/axiom.git
$ cd axiom && make
$ sudo make install
$ docker pull awwyan/axiom
$ docker run -it --rm -v $(pwd):/work awwyan/axiom /work/myfile.c
$ brew tap ovenpickled/axiom
$ brew trust ovenpickled/axiom
$ brew install axiom

Requires Homebrew. Works on macOS and Linux.

capabilities

Everything you need. Nothing you don't.

One C file. No external dependencies. Builds with any C99 compiler in under a second.

syntax
Syntax Highlighting
C, C++, Python, Go, and Rust out of the box. Incremental per-row highlighting with correct multi-line comment propagation. Extend it by adding entries to the HLDB array.
buffers
Multiple Buffers
Up to 10 open files with a persistent tab bar. Switch with Ctrl-← / Ctrl-→. Unsaved changes are tracked per buffer with a dot indicator — no buffer closes silently.
select
Visual Selection
Line-wise selection with Ctrl-K, just like Vim's Shift-V. Extend with arrow keys. Copy with Ctrl-C, paste with Ctrl-V. Multi-line paste inserts correctly without double-indenting.
search
Incremental Search
Matches highlight in real time as you type. Navigate between them with arrow keys. Escape cancels and returns the cursor to where you started.
indent
Smart Indentation
Tab snaps to the nearest tab stop rather than inserting a fixed number of spaces. Backspace removes a full indent level. New lines inherit the indent level of the line above.
config
~/.axiomrc
Tab width, scroll speed, and all buffer keybindings are configurable at runtime. Accepts ctrl-a through ctrl-z, ctrl-left, and ctrl-right. No recompiling required.
in action

See it running

Axiom editing code, switching buffers, and selecting text.

Axiom welcome screen showing ASCII banner
Axiom editing axiom.c with C syntax highlighting
Axiom with three buffers open in the tab bar
Axiom visual line selection active on a Python file
reference

Keybindings

Default bindings. Buffer navigation keys are remappable in ~/.axiomrc.

Ctrl-SSave file
Ctrl-QQuit
Ctrl-FFind / search
Ctrl-KToggle visual selection
Ctrl-CCopy selection or current line
Ctrl-VPaste
Ctrl-TNew buffer
Ctrl-WClose buffer
Ctrl-→Switch to next buffer
Ctrl-←Switch to previous buffer
Page Up / DownScroll by screen height
Home / EndStart / end of line