A minimal text editor built completely from scratch using C, SDL3, and SDL3_ttf — no external text editing libraries.
It’s a lightweight prototype that demonstrates how text editors manage text, cursor movement, and rendering in real time.
- 🧱 Custom Text Buffer – implemented using a Linked List structure for dynamic insertion/deletion.
- ⚡ Cursor Movement – smooth left/right up/down navigation with blinking effects.
- 🔤 Character Rendering – text drawn using
SDL3_ttfwith real-time updates. - ↩️ Line Management – new lines handled using a linked list of linked lists (document → line → characters).
- ⌫ Backspace Support – safely removes characters, including at line boundaries.
- 🧠 Ready for Optimization – structure designed to evolve into gap buffers or rope trees later.
Document ├── LineNode (linked list of lines) │ └── TextBuffer (doubly linked list of characters) │ ├── Node (char, prev, next) │ └── Cursor pointer
This structure mimics how real editors like Vim or VS Code manage text efficiently.
- Language: C (compiled as
.cppfor compatibility) - Graphics & Rendering: SDL2
- Font Handling: SDL_ttf
-✅ Smooth blinking cursor -✅ Multi-line rendering -🕹️ Text selection -💾 File saving/loading -🧩 Undo/Redo system -🚀 Gap buffer optimization