# xi-editor/xi-editor

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/xi-editor-xi-editor).**

19,816 stars · 706 forks · Rust · Apache-2.0

## Links

- GitHub: https://github.com/xi-editor/xi-editor
- Homepage: https://xi-editor.io
- awesome-repositories: https://awesome-repositories.com/repository/xi-editor-xi-editor.md

## Description

xi-editor is a high-performance text editor core written in Rust. It employs a client-server architecture that separates the backend editor logic from the user interface, allowing diverse frontends to communicate with the core via a standardized protocol.

The project is distinguished by its use of rope-based text buffers for efficient manipulation of large documents and a collaborative engine powered by conflict-free replicated data types to synchronize concurrent edits. It further features an extensible plugin system that integrates external binaries and third-party tools through JSON-based remote procedure calls.

The system covers a wide range of capabilities, including incremental syntax highlighting, GPU-accelerated rendering, and asynchronous word wrapping. It manages complex document states through append-only revision history and provides low-level text processing utilities for grapheme boundary calculation and code point navigation.

The backend handles expensive operations like text layout and edit merging in the background to ensure the primary user interface remains responsive.

## Tags

### Software Engineering & Architecture

- [Client-Server Architecture](https://awesome-repositories.com/f/software-engineering-architecture/client-server-architecture.md) — Implements a client-server architecture where a Rust backend manages editor state and communicates with diverse frontends. ([source](https://cdn.jsdelivr.net/gh/xi-editor/xi-editor@master/README.md))
- [Client-Server Text Editor Architectures](https://awesome-repositories.com/f/software-engineering-architecture/client-server-text-editor-architectures.md) — Employs an architecture where a Rust-based central server manages editor state while separate clients provide the user interface.
- [Conflict-Free Replicated Data Types](https://awesome-repositories.com/f/software-engineering-architecture/conflict-free-replicated-data-types.md) — Utilizes conflict-free replicated data types to ensure deterministic convergence of concurrent edits across multiple users or processes.
- [CRDT State Synchronization Engines](https://awesome-repositories.com/f/software-engineering-architecture/crdt-state-synchronization-engines.md) — Implements a synchronization engine based on conflict-free replicated data types for merging concurrent edits.
- [Extensible Plugin Architectures](https://awesome-repositories.com/f/software-engineering-architecture/extensible-plugin-architectures.md) — Features a modular architecture that integrates external binaries and third-party tools through JSON-based RPC.
- [RPC-Based Plugin Systems](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/third-party-plugins/rpc-based-plugin-systems.md) — Integrates external binaries and third-party tools through a specialized JSON-based remote procedure call system.
- [Rope-Based Text Storage](https://awesome-repositories.com/f/software-engineering-architecture/rope-based-text-storage.md) — Uses a rope data structure to store document content in a tree of slices for efficient large-file manipulation.
- [Undo-Redo Management](https://awesome-repositories.com/f/software-engineering-architecture/undo-redo-management.md) — Provides a system for managing the editing timeline through history stack operations and state restoration. ([source](https://xi-editor.io/docs/crdt-details.html))
- [Document Versioning](https://awesome-repositories.com/f/software-engineering-architecture/version-history-viewers/document-versioning.md) — Maintains a sequence of reversible revisions to track and recover previous states of text documents. ([source](https://xi-editor.io/docs/crdt-details.html))
- [Logarithmic Line Access](https://awesome-repositories.com/f/software-engineering-architecture/code-complexity-metrics/source-statement-metrics/line-counting/logarithmic-line-access.md) — Locates specific line numbers or calculates total line counts in logarithmic time regardless of document length. ([source](https://xi-editor.io/docs/rope_science_02.html))
- [Background Task Schedulers](https://awesome-repositories.com/f/software-engineering-architecture/execution-control/background-task-schedulers.md) — Manages asynchronous background operations using snapshots to ensure the user interface remains responsive. ([source](https://cdn.jsdelivr.net/gh/xi-editor/xi-editor@master/README.md))
- [Parallel Text Processing](https://awesome-repositories.com/f/software-engineering-architecture/parallel-text-processing.md) — Distributes expensive text operations like word wrapping across multiple CPU cores using a MapReduce approach.

### User Interface & Experience

- [Decoupled Editor Frontends](https://awesome-repositories.com/f/user-interface-experience/decoupled-editor-frontends.md) — Employs a client-server architecture that separates the backend editor logic from diverse user interfaces via a standardized protocol.
- [JSON-RPC Extension Interfaces](https://awesome-repositories.com/f/user-interface-experience/external-extension-controllers/json-rpc-extension-interfaces.md) — Communicates with third-party tools via JSON messages over pipes to extend functionality using any programming language. ([source](https://cdn.jsdelivr.net/gh/xi-editor/xi-editor@master/README.md))
- [Conflict-Free Text Synchronization](https://awesome-repositories.com/f/user-interface-experience/rich-text-editors/collaborative-rich-text-binding/conflict-free-text-synchronization.md) — Synchronizes text changes across multiple users or processes using a conflict-free replicated data type model. ([source](https://xi-editor.io/docs.html))
- [Grammar Pattern Analysis](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/grammar-pattern-analysis.md) — Analyzes text patterns incrementally to apply visual styling based on the language grammar. ([source](https://xi-editor.io/docs.html))
- [Incremental Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters/incremental-highlighting.md) — Computes syntax spans for text changes by calculating deltas and updating a state cache for instant responses. ([source](https://xi-editor.io/docs/rope_science_11.html))
- [Text Selection Control](https://awesome-repositories.com/f/user-interface-experience/text-selection-control.md) — Manages cursor movement and complex selection ranges across point, word, or line granularity. ([source](https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html))
- [Incremental Text Rendering](https://awesome-repositories.com/f/user-interface-experience/incremental-text-rendering.md) — Produces a sequence of rendered lines by computing only the slices necessary for the current viewport. ([source](https://xi-editor.io/docs/rope_science_12.html))
- [Syntax Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighting.md) — Computes incremental syntax spans and text styling in the background to ensure a responsive interface.
- [Incremental Wrapping](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/layout-structural-components/interface-layout-utilities/text-wrapping-utilities/incremental-wrapping.md) — Calculates new line breaks based on the Unicode UAX #14 algorithm and updates only affected regions. ([source](https://xi-editor.io/docs/rope_science_05.html))
- [Parallel Wrapping](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/layout-structural-components/interface-layout-utilities/text-wrapping-utilities/parallel-wrapping.md) — Distributes the word wrapping process across multiple CPU cores to improve performance on large files. ([source](https://xi-editor.io/docs/rope_science_06.html))

### Data & Databases

- [Document](https://awesome-repositories.com/f/data-databases/graphql-integrations/state-synchronization/document.md) — Merges local state with remote updates using a conflict resolver and page watcher for consistency. ([source](https://xi-editor.io/docs/fuchsia-ledger-crdts.html))
- [Text Buffers](https://awesome-repositories.com/f/data-databases/text-buffers.md) — Uses a rope data structure for memory-efficient storage and rapid manipulation of large text documents. ([source](https://xi-editor.io/docs/crdt-details.html))
- [Immutable Document Snapshots](https://awesome-repositories.com/f/data-databases/acid-transactional-cores/concurrent-read-write-transactions/copy-on-write-transaction-systems/immutable-document-snapshots.md) — Executes long-running background tasks on immutable document snapshots to prevent blocking the primary user interface.
- [Delta-Based Synchronization Engines](https://awesome-repositories.com/f/data-databases/data-synchronization/delta-based-synchronization-engines.md) — Updates the frontend cache by transmitting only specific incremental changes and invalidations needed for the current viewport.
- [Append-Only Log Stores](https://awesome-repositories.com/f/data-databases/key-value-stores/append-only-log-stores.md) — Stores document revisions as sequenced key-value pairs in an append-only log to track changes and retrieve diffs. ([source](https://xi-editor.io/docs/fuchsia-ledger-crdts.html))
- [Chunked List Storage](https://awesome-repositories.com/f/data-databases/storage-abstraction/file-storage-services/chunked-file-storages/chunked-list-storage.md) — Chunks large datasets into linked lists or ordered keys to keep commit sizes proportional to change size. ([source](https://xi-editor.io/docs/fuchsia-ledger-crdts.html))
- [Text Search and Replace](https://awesome-repositories.com/f/data-databases/text-pattern-matching/text-search-and-replace.md) — Provides utilities for locating and updating text strings using regular expressions and case-sensitivity settings. ([source](https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html))
- [Text Tree Metrics](https://awesome-repositories.com/f/data-databases/text-processing-utilities/text-extraction/text-segmentation/metric-caching/text-tree-metrics.md) — Implements logarithmic time updates for maximum line width and summary information by maintaining metrics within the text tree. ([source](https://xi-editor.io/docs/rope_science_01.html))

### Development Tools & Productivity

- [Frontend Integration Protocols](https://awesome-repositories.com/f/development-tools-productivity/frontend-integration-protocols.md) — Implements a standardized protocol that allows diverse user interfaces to communicate with the core editor backend. ([source](https://xi-editor.io/frontends.html))
- [Multi-Cursor Editing](https://awesome-repositories.com/f/development-tools-productivity/multi-cursor-editing.md) — Provides capabilities for simultaneous text manipulation, insertions, and deletions across multiple document locations. ([source](https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html))
- [Text Editing Workflows](https://awesome-repositories.com/f/development-tools-productivity/text-editing-workflows.md) — Executes text insertions, pastes, copies, and cuts at current cursor locations across single or multiple cursors. ([source](https://xi-editor.io/docs/frontend-protocol.html))
- [Text Editors](https://awesome-repositories.com/f/development-tools-productivity/text-editors.md) — Implements a high-performance text editing backend in Rust for managing large buffers and document state.
- [Balanced Bracket Matching](https://awesome-repositories.com/f/development-tools-productivity/bracket-based-navigation/balanced-bracket-matching.md) — Scans text to identify and pair corresponding brackets to facilitate easier navigation. ([source](https://xi-editor.io/docs.html))
- [Undo Grouping](https://awesome-repositories.com/f/development-tools-productivity/change-tracking/logical-unit-reverts/undo-grouping.md) — Groups related text edits into single logical units so one undo action reverts a sequence of changes. ([source](https://xi-editor.io/docs/crdt.html))
- [Atomic Group Undo](https://awesome-repositories.com/f/development-tools-productivity/change-tracking/undo-trees/atomic-group-undo.md) — Reverts groups of related changes while maintaining consistency during interleaved asynchronous processes. ([source](https://xi-editor.io/docs/rope_science_09.html))
- [Extension Lifecycle Management](https://awesome-repositories.com/f/development-tools-productivity/extension-ecosystems/extension-marketplaces/extension-lifecycle-management.md) — Controls the lifecycle of plugins by starting, stopping, and communicating with them via custom RPC commands. ([source](https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html))
- [Blocking Task Offloaders](https://awesome-repositories.com/f/development-tools-productivity/task-execution/blocking-task-offloaders.md) — Delegates expensive text manipulation tasks to a dedicated backend core to prevent the user interface from blocking. ([source](https://cdn.jsdelivr.net/gh/xi-editor/xi-editor@master/README.md))
- [Text Buffer Manipulations](https://awesome-repositories.com/f/development-tools-productivity/text-buffer-manipulations.md) — Provides utilities for programmatically modifying content within the text buffer via deltas and rich text spans. ([source](https://xi-editor.io/docs/plugin.html))
- [Asynchronous Wrapping](https://awesome-repositories.com/f/development-tools-productivity/text-wrapping-utilities/asynchronous-wrapping.md) — Computes word wrapping in the background to maintain interface responsiveness and minimize visual jumping. ([source](https://xi-editor.io/docs/rope_science_06.html))
- [Undo History Managers](https://awesome-repositories.com/f/development-tools-productivity/undo-history-managers.md) — Manages document editing history to revert previous edits within asynchronous environments. ([source](https://xi-editor.io/docs/rope_science_08a.html))

### Operating Systems & Systems Programming

- [High-Performance Text Processing](https://awesome-repositories.com/f/operating-systems-systems-programming/rust-systems-programming/high-performance-text-processing.md) — Leverages Rust to implement high-performance, low-latency text processing utilities and buffer management.
- [GPU-Accelerated UI Rendering](https://awesome-repositories.com/f/operating-systems-systems-programming/hardware-interfacing-drivers/hardware-acceleration/graphics-acceleration/gpu-accelerated-ui-rendering.md) — Utilizes graphics pipelines and GPU acceleration to render the editor interface across different operating systems. ([source](https://xi-editor.io/gsoc.html))

### Programming Languages & Runtimes

- [Large-Scale Text Handling](https://awesome-repositories.com/f/programming-languages-runtimes/large-scale-text-handling.md) — Utilizes rope data structures and asynchronous workflows to manipulate and render massive text files efficiently.

### Web Development

- [Collaborative Editing Conflict Resolution](https://awesome-repositories.com/f/web-development/collaborative-editing-conflict-resolution.md) — Implements algorithms to resolve conflicts between concurrent text updates to ensure deterministic state convergence. ([source](https://xi-editor.io/docs/rope_science_08a.html))
- [Collaborative Editing Frameworks](https://awesome-repositories.com/f/web-development/collaborative-editing-frameworks.md) — Uses conflict-free replicated data types to synchronize concurrent edits across multiple users or processes.
- [Line Validity Tracking](https://awesome-repositories.com/f/web-development/server-side-rendering/rendering-validation/invalidation-validators/rendering-invalidation-tracking/line-validity-tracking.md) — Tracks valid and invalid lines across the client and server to minimize computation and serialization overhead. ([source](https://xi-editor.io/docs/rope_science_12.html))

### Part of an Awesome List

- [Edit Reconciliation](https://awesome-repositories.com/f/awesome-lists/devtools/collaborative-editing/edit-reconciliation.md) — Transforms edits from old revisions to be compatible with the current document head using priority-based ordering. ([source](https://xi-editor.io/docs/crdt-details.html))

### Business & Productivity Software

- [Delta Synchronization](https://awesome-repositories.com/f/business-productivity-software/client-side-data-synchronization/delta-synchronization.md) — Uses a delta protocol to synchronize only modified render state changes between the backend and frontend cache. ([source](https://xi-editor.io/docs/rope_science_12.html))
- [Editor Preferences](https://awesome-repositories.com/f/business-productivity-software/user-preference-settings/editor-preferences.md) — Manages user preferences for the general environment, specific languages, and individual view settings. ([source](https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html))

### Content Management & Publishing

- [Rendering and Visualization](https://awesome-repositories.com/f/content-management-publishing/content-processing-transformation/document-processing-conversion/document-processing/rendering-visualization.md) — Measures rendered display width of strings to facilitate line breaks and word wrapping. ([source](https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html))

### DevOps & Infrastructure

- [Trigger-Based Plugin Invocation](https://awesome-repositories.com/f/devops-infrastructure/release-automation/plugin-extensibility/plugin-extensible-runtimes/trigger-based-plugin-invocation.md) — Integrates external binaries using trigger-based invocation to add capabilities across various execution lifecycles. ([source](https://xi-editor.io/docs/plugin.html))

### Graphics & Multimedia

- [Grapheme Cluster Enumeration](https://awesome-repositories.com/f/graphics-multimedia/grapheme-cluster-enumeration.md) — Identifies the boundaries of user-perceived characters to ensure accurate cursor movement and text deletion. ([source](https://xi-editor.io/docs.html))
- [Soft Line Wrapping](https://awesome-repositories.com/f/graphics-multimedia/line-layout-generators/soft-line-wrapping.md) — Calculates and stores layout boundaries to enable incremental reformatting and asynchronous painting. ([source](https://xi-editor.io/docs/rope_science_02.html))
- [Text Dimension Measurement](https://awesome-repositories.com/f/graphics-multimedia/text-dimension-measurement.md) — Calculates the exact rendered display width of strings to determine appropriate line breaks. ([source](https://xi-editor.io/docs/frontend-protocol.html))

### Networking & Communication

- [P2P State Convergence](https://awesome-repositories.com/f/networking-communication/peer-to-peer-database-replication/p2p-state-convergence.md) — Merges document changes from multiple devices using conflict-free replicated data types for peer convergence. ([source](https://xi-editor.io/docs/crdt-details.html))
- [State Synchronization](https://awesome-repositories.com/f/networking-communication/state-synchronization.md) — Synchronizes incremental changes, styles, and annotations between the backend and the frontend UI. ([source](https://xi-editor.io/docs/frontend-protocol.html))
