WiM is a small terminal text editor written in C. It is intentionally simple: the project is a compact place to learn about terminal input, text buffers, and editor state.
WiM requires a C11 compiler and a POSIX terminal. Build it with:
make
# Equivalent explicit build target:
make buildThe build enables common compiler warnings. Run the non-interactive regression tests with:
make testRemove generated files with make clean.
Open an existing file or prepare a new file for editing:
./wim path/to/file.txt
./wim path/to/new-file.txt
./wim --helpRunning ./wim without a filename opens an unnamed buffer. The unnamed buffer
can be edited, but it must be opened with a filename to be saved.
If standard input closes while WiM is running, the editor exits cleanly and restores the terminal instead of waiting forever for another key.
| Key | Action |
|---|---|
i |
Enter insert mode |
h / j / k / l |
Move left / down / up / right |
| Arrow keys | Move the cursor |
0 / $ |
Move to the start / end of the line |
x |
Delete the character under the cursor |
n or Ctrl-S |
Save the current file |
q |
Quit |
The original w, a, s, and d movement keys are also supported.
Type text normally. Enter splits the current line, Backspace joins or
deletes text, and Escape returns to normal mode.
WiM is an intentionally small learning project rather than a replacement for Vim or Neovim. It currently focuses on reliable line editing, basic terminal navigation, and safe file loading/saving.