TWrite Documentation

TWrite is a fast, modular text editor engine for Rust, built on the GPU-accelerated GPUI framework. It provides an extensible foundation for building everything from simple single-line inputs to full-featured Markdown note-taking tools and modal code editors.

Highlights

  • GPU Acceleration: Fluid 60+ FPS text rendering and smooth scrolling powered by GPUI.
  • Rope Buffer Engine: Backed by ropey for fast inserts, deletes, and multi-megabyte document handling with transaction-based undo/redo.
  • Extensible Hook Architecture: Custom keybindings, auto-pairs, status indicators, and modal editing via pure-Rust hooks with zero GPUI boilerplate.
  • Batteries-Included Markdown: Live syntax highlighting, concealed formatting (Dimmed, Hidden, Off), interactive task checkboxes, tables, and hyperlinks.
  • Interactive Find & Replace: Built-in search engine with regex support, whole-word and case toggles, caret steppers, and single-undo replace all.
  • Command Palettes & Prompts: Headless prompt engine for floating F1 palettes, :goto-line bottom bars, and fuzzy-filtered item lists.
  • Multi-Click Selection: Word double-click, line triple-click, and boundary-snapping drag selection.

Where to Start

  1. Getting Started: Add twrite to your Cargo.toml and launch your first editor window in under 35 lines of code.
  2. Recipes:
  3. Reference: