今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

I Built My Own Text Editor

Genix 2026年07月04日 14:44 2 次阅读 来源:Dev.to

I’ve wanted to build a text editor for a long time. Not because I thought the world needed another one — it clearly doesn’t — but because editors are one of those projects where you end up touching everything: rendering, input handling, text buffers, undo, plugins, configuration, even OS integration. It felt like the most honest way to learn how these tools actually work. So I finally did. cdin is a lightweight, keyboard-centric text editor with Vim-style modal editing. It started as a fork of lite , but over time it became something more personal. I kept the parts I liked, removed the parts I did not, and reshaped the rest to match the way I actually work. A big reason for that was my computer. I have a weak machine, and that made heavier text editors feel frustrating to use. They were often slow, laggy, or just too much for what I needed. That is how I discovered lite in the first place. It was close to what I wanted, but not quite there. So I forked it, renamed it to cdin, and started making it mine. That meant more than just small tweaks. I removed features I did not need, changed the things that felt awkward, moved from SDL2 to SDL3, and rewired a lot of the project structure along the way. The result is cdin: a small editor built around speed, simplicity, and hackability. The name itself is simple too. cdin means “CODE in”. The code is split between C and Lua. The C side handles the window, renderer, and SDL bindings. Everything else — behavior, plugins, keybindings, config — is loaded in Lua at runtime. That keeps the editor flexible without making it feel heavy. If you want to explore the project, here are the main docs: Overview · Getting Started · Building from Source · Configuration · Vim Keybindings · Plugins · Command Reference There is still a lot I want to improve, but cdin already feels like something that belongs to me in a way no other editor ever did. If you check it out, please leave a star, fork it, or send an Issue or PR if you find a bug or wa

本文内容来源于互联网,版权归原作者所有
查看原文