cdin v0.1.0-beta.1
[0.1.0-beta.1] — 2025-12-27
This is the first public release. It's a beta: the core editor is functional and usable day-to-day, but some things are still rough. APIs may change, a few documented features are stubs, and there are almost certainly bugs. Bug reports and patches are welcome.
Core editor
- Windowed editor built on SDL3, with a custom title bar drawn entirely in Lua. No OS window decorations — cdin draws its own minimize/maximize/close buttons and handles the drag region via SDL's hit-test API.
- Custom renderer backed by stb_truetype. Three bundled fonts: a proportional UI font, a monospace editor font, and an icon font.
- Event loop running at a configurable FPS (default 60), with coroutine-based background threads for project scanning and similar tasks.
- Document model with unlimited undo/redo (configurable cap, default 10,000 steps) and undo merging for consecutive edits within a short time window.
- Project file scanner runs in a background thread and rescans every 5 seconds. Respects
config.ignore_files(default: dot files). - Files dropped onto the window open as new documents. Directories dropped open a new editor instance.
- Unsaved-changes dialog on quit.
- On crash, dirty documents are saved to
<filename>~and a stack trace is written toerror.txt.
Vim mode
- Modal editing with three modes: Normal, Insert, Visual.
- Every buffer opens in Normal mode by default.
- Current mode shown in the status bar as
[NORMAL],[INSERT], or[VISUAL]. - Motions in Normal and Visual mode:
h j k l,w b e,0,$(viashift+4),^(viashift+6),gg,G. - Operators:
d,dd,D,yy,cc,x,p,u(undo),r(redo). - Mode transitions:
i,a,o,I,A,O,v,Escape. - Tab in Normal mode cycles to the next open tab.
- Ex command line opened with
:(orshift+;). - Ex command history navigable with Up/Down while the command line is open.
- Pending-key timeout of 600 ms for two-key sequences like
gganddd.
Ex commands
:w, :w!, :wa — save current file / save all
:q, :q!, :qa, :qa! — close / force-close / quit
:wq, :x, :wqa, :xa — save-then-close variants
:e <path>, :edit <path> — open file
:new <path> — create and open a new file
:mkdir <path> — create directory tree
:rm <path>, :delete <path> — remove file or directory
:rename <old> <new>, :copy <src> <dst>, :move <src> <dst> — file operations
:ls [path] — list directory in a scratch buffer
:pwd — print working directory
:cd <path> — change working directory
:<number> — go to line
:!<cmd> — run shell command; output appears in a new scratch buffer
:tree — focus/toggle the project tree
:help — show ex command reference in a scratch buffer
File-path arguments to :e, :new, :mkdir, :rm, :rename, :copy, :move, :cd support tab-completion.
File manager menu (m)
Pressing m in Normal mode (or via vim-fmenu:open) opens a context-sensitive action menu. The available actions depend on where focus is:
- When the tree view is focused on a file: rename, delete, copy, move, open in editor, run shell command on it.
- When the tree view is focused on a directory: new file, new directory, rename, delete, run shell command.
- When a document is active: actions apply to that document's file.
Standard keybindings (non-vim)
The full default keymap is documented in Command Reference. Highlights:
Ctrl+Shift+P — command palette
Ctrl+P — fuzzy open file from project
Ctrl+O — open file by path
Ctrl+N — new document
Ctrl+S / Ctrl+Shift+S — save / save as
Ctrl+F / Ctrl+R — find / replace
Ctrl+G — go to line
Ctrl+Z / Ctrl+Y — undo / redo
Alt+1–9 — switch to tab by index
Plugins (bundled)
- treeview — project tree panel. Shows git status markers (A/M/D/?) when
config.treeview_git_enabledis true. Polls every 2 seconds by default. Toggle hidden files withCtrl+Shift+Hor viaconfig.show_hidden_files. - autocomplete — word completion from all open documents. Shows up to 6 suggestions by default (
config.autocomplete_max_suggestions). - projectsearch — search across all project files; results open in a dedicated view.
- autoreload — detects when a file is changed on disk by another process and offers to reload it.
- trimwhitespace — strips trailing whitespace from every line on save. Runs automatically; no configuration needed.
Build system
make/make build— release buildmake debug— debug build (-O0 -g3)make run— build and runmake install— install toPREFIX(default/usr/local)make clean/make distcleanmake info— print build configuration summary- Version is derived from the nearest git tag; falls back to
0.0.0+<commit>. - Supports SDL3 (required) and Lua 5.3 or 5.4 (auto-detected via pkg-config).
- Linux, macOS, and Windows (MinGW) are all supported platforms.
Known issues and limitations
- The
docs/guides/directory in the repository contains stubs for several planned guides (configuration, plugin development, vim keybindings, API reference). This release ships those documents. - No plugin package manager. Plugins are installed by dropping Lua files into
data/plugins/. - The Windows build requires manual SDL3 setup (see Building from Source).
- No LSP integration yet.
- No multiple cursors.
- Visual mode only supports character-wise selection. Line-wise and block-wise visual modes are not implemented.
Installation
Linux (x86_64)
tar xzf cdin-v0.1.0-beta.1-linux-x86_64.tar.gz
cd cdin-v0.1.0-beta.1-linux-x86_64
bash install.sh # → ~/.local (no sudo)
# or system-wide:
sudo bash install.sh --prefix=/usr/localSDL3 runtime — needed at runtime if not already installed:
- Ubuntu 24.04+:
sudo apt install libsdl3-0- Other distros: see SDL3 releases
Windows (x86_64)
- Download
cdin-v0.1.0-beta.1-windows-x86_64.zipand extract it. - Open PowerShell inside the extracted folder and run:
.\install.ps1
# Optional:
.\install.ps1 -RegisterFileTypes # set as default for text/code files
.\install.ps1 -Prefix C:\Tools\cdin # custom locationThe installer copies
cdin.exe,SDL3.dll, and the Lua DLL into
%LOCALAPPDATA%\cdin\binand adds that folder to your user PATH.