Expand description
Headless editing core: text, positions, selections, actions, transactions and undo. No egui and no filesystem access (PLAN 3.1, 7).
Re-exports§
pub use action::Action;pub use action::ActionError;pub use action::Direction;pub use action::Motion;pub use buffer::Buffer;pub use buffer::BufferId;pub use buffer::FileMeta;pub use buffer::LineEdit;pub use buffer::LineEnding;pub use changeset::Bias;pub use changeset::ChangeSet;pub use changeset::Edit;pub use editor::Clock;pub use editor::Editor;pub use editor::ManualClock;pub use editor::Settings;pub use editor::SystemClock;pub use history::EditKind;pub use history::Transaction;pub use macros::MacroError;pub use macros::NamedMacro;pub use macros::Repeat;pub use position::ByteOffset;pub use position::CharIdx;pub use position::LineCol;pub use position::VisualCol;pub use search::SearchError;pub use search::SearchOptions;pub use search::SearchQuery;pub use search::Searcher;pub use selection::Rectangle;pub use selection::Selection;pub use selection::SelectionSet;pub use text::Document;pub use transform::CaseMode;pub use transform::SortOptions;pub use view::DisplayMap;pub use view::IdentityDisplayMap;pub use view::View;pub use view::ViewId;
Modules§
- action
Action: what the user intends, independent of where the carets are (PLAN 3.5). Key bindings map to actions and macros record them.- buffer
Buffer: one document’s text, undo history, revisions and file metadata.- changeset
ChangeSet: concrete, non-overlapping edits against one document state.- diff
- Line and word diff for the compare view (PLAN M12), using
similar. - editor
Editor: owns buffers and views.Editor::applyis the only path that mutates a document (PLAN 3.5).- history
- Undo/redo over
Transactions, with coalescing of consecutive typing. - macros
- Macro playback. Recording happens in
Editor::apply: while recording, every successful recordable action is appended. - position
- Position newtypes and the conversions between them.
- search
- Find and replace over the document without copying it into a
String. - selection
- Selections are always a set (PLAN 3.3). A plain cursor is a set of one empty selection.
- text
Document: the rope, addressed only byByteOffset.- transform
- Text transforms: case conversion, line sorting, and line operations (trim, duplicate, move, join). Each resolves to one transaction.
- view
View: a window onto a buffer with its own selections and scroll position.