Skip to main content

Crate redox_core

Crate redox_core 

Source
Expand description

Core editor primitives.

This crate provides a rope-based text buffer (via ropey) and small, focused navigation utilities suitable for implementing a Vim-like editor.

Notes on indexing

  • ropey::Rope is UTF-8 text stored as a rope.
  • Most editing operations are most naturally expressed in char indices (usize counts of Unicode scalar values), because ropey exposes many APIs in terms of char offsets.
  • The UI may need byte indices for interoperability with external data, but those are not used as the primary index type in this crate.

Re-exports§

pub use buffer::Edit;
pub use buffer::Pos;
pub use buffer::Selection;
pub use buffer::TextBuffer;
pub use session::BufferId;
pub use session::BufferKind;
pub use session::BufferMeta;
pub use session::BufferSummary;
pub use session::EditorSession;

Modules§

buffer
Ropey-backed text buffer module.
io
Core IO helpers for loading/saving text buffers.
logic
Legacy compatibility module for higher-level editor logic.
motion
High-level editor navigation logic (motions).
session
Multi-buffer session model for higher-level editor frontends.
text
Shared text position types and helpers used by the buffer.