small, fast, keyboard-driven text editor
1.2K
A small, fast, keyboard-driven text editor. Vim-style modal editing is on by default. The core is C; everything else is Lua you can read and change.

cdin started as a fork of lite. The fork kept what made lite interesting — a tiny C runtime, a Lua editor on top, and a clean boundary between the two — and built from there.
The C layer handles the window, the renderer, and the SDL bindings. It doesn't
know anything about documents, keybindings, or plugins. The Lua layer, loaded
at startup from data/, is the actual editor. This means you can change how
almost anything works — commands, keybindings, UI behavior, syntax highlighting
— without recompiling. The binary is just a host.

Vim-style modal editing is built in and on by default. Every buffer opens in
Normal mode. The status bar always shows [NORMAL], [INSERT], or [VISUAL]
so you always know where you are. If you've used vim the basics transfer
directly. If you haven't, Vim Keybindings
has everything you need.
The codebase is meant to be readable. You should be able to find the edit loop, understand what it does, and change it. Functions are short. Modules are small. There are no clever abstractions that require you to know the whole project before touching any of it.
Features belong in plugins. The core does the minimum that every editor needs.
Anything optional is in data/plugins/ where it can be read, copied, modified,
or replaced without touching the core. This is how lite-xl approaches things
too, and it works.
Startup time and memory use matter. The renderer only redraws what actually changed. Background tasks are coroutines, not threads. An idle cdin draws almost nothing and uses almost no CPU.
:w, :q, :e, :!cmd, and more)Ctrl+P)data/user/init.lua — plain Lua, no DSLgit clone https://github.com/m-mdy-m/cdin.git
cd cdin
# build (requires gcc, make, SDL3, Lua 5.4)
make
# run in the current directory
./build/linux-release/cdin .
# or open a file
./build/linux-release/cdin path/to/file.c
See Building from Source for dependencies and platform-specific notes. There's also a Python script if you prefer not to use make directly:
python3 scripts/cdin.py build-install
m action menuAll build, install, and asset tasks go through one entry point:
python3 scripts/cdin.py [command]
| Command | Does |
|---|---|
build | Compile from source |
install | Install binary + data + desktop integration |
build-install | Build then install in one step |
update | Download the latest release from GitHub |
uninstall | Remove an installation |
gen-icon | Regenerate icons from scripts/icon.svg |
gen-logo | Regenerate data/core/rootview/logo.lua |
Run with no arguments for an interactive wizard. Full documentation is in
scripts/README.md.
MIT — see LICENSE.
Content type
Image
Digest
sha256:759986f7e…
Size
93.8 MB
Last updated
7 days ago
docker pull bitsgenix/cdin