te
A from-scratch text editor that aims to stay fast, hackable, and practical for day-to-day coding.
What this project is
te is a native desktop editor written as a single C++ executable (SDL3 + OpenGL + custom editor core).
It is built around a straightforward single-threaded architecture, with coroutines used for asynchronous workflows (searching, UI flows, process jobs) so behavior stays easy to reason about and debug.
The codebase includes its own:
- text buffer + undo/redo engine
- window/view layout system
- command system + keybinding parser
- fuzzy selection UI
- process execution and output streaming
- built-in font fallback (baked into the binary)
Highlights
- VS Code-style keybindings and command palette (
Ctrl+Shift+P) - Multi-cursor editing (keyboard and mouse workflows)
- Fuzzy-open patterns for commands, files, and open buffers
- Project-wide search (
Ctrl+Shift+F) and replace-all workflow - Shell integration directly from editor input:
:Commandto run editor commands:Set ...to configure options and keybindings!cmd/!!cmdto execute shell commandspy:...to execute Python snippets via discovered Python interpreter
- Build panel integration (
Ctrl+B,Alt+B, etc.) with configurable build commands - Config-driven behavior (font, colors, project commands, keymaps, paths)
Build
Linux
Requirements:
clangcmakelibbacktrace- SDL3 (the build script can clone and install SDL when missing)
Build commands:
./build.sh # debug build (default)
./build.sh release # optimized build
./build.sh slow # extra asserts/instrumentation path
Run:
./build/te
./build/te path/to/file.cpp
Windows
Use the x64 Native Tools Command Prompt for Visual Studio.
Requirements:
- Visual Studio C++ toolchain (
cl,msbuild) cmake
Build commands:
build.bat
build.bat release
build.bat slow
Run:
build\te.exe
build\te.exe path\to\file.cpp
First steps in the editor
Ctrl+N: new bufferCtrl+O: open current file's folder / directory navigation viewCtrl+P: fuzzy list of open buffersCtrl+Shift+P: all commandsCtrl+QorF12: open thing under caret (path / link / command)Ctrl+F,F3,Shift+F3: in-buffer search flowCtrl+Shift+F: interactive search across open project buffersAlt+Shift+Up/Down: add cursors verticallyCtrl+B: run Build1 command (configurable)
Configuration
On startup, te loads a config file from SDL's app preference directory (config.te).
You can also pass additional .te files as CLI arguments.
Useful examples:
:Set FontSize 16
:Set PathToFont '/path/to/font.ttf'
:Set Build1OnUnix 'sh build.sh release'
:Set Build1OnWindows 'build.bat release'
:Set TextColor ff202020
:Set BackgroundColor fffdf6e3
Notes on architecture
- Single-threaded main loop (event/update/render)
- Coroutines for async editor tasks instead of multi-threaded complexity
- "Plugin" modules are integrated in the source tree and compiled in
- Focus on predictable behavior and low-latency interaction
Description
A from-scratch text editor that aims to stay fast, hackable, and practical for day-to-day coding.
Languages
C++
91.8%
C
7.8%
Shell
0.2%
Batchfile
0.2%
