Skip to main content

hjkl_buffer/
lib.rs

1//! # hjkl-buffer
2//!
3//! Rope-backed text buffer with vim-shaped semantics: charwise/linewise/
4//! blockwise selection, motions matching vim edge cases (no `h` wrap, `$`
5//! clamp, sticky col on `j`/`k`), folds, viewport, and search.
6//!
7//! Extracted from `sqeel-buffer` with full git history. See
8//! [MIGRATION.md][plan] for the roadmap and stability contract.
9//!
10//! ## Features
11//!
12//! - `ratatui` (off by default): enables the [`render`] module with a direct
13//!   cell-write `ratatui::widgets::Widget` impl for [`Buffer`].
14//!
15//! [plan]: https://github.com/kryptic-sh/hjkl/blob/main/MIGRATION.md
16
17#![deny(unsafe_op_in_unsafe_fn)]
18
19mod buffer;
20mod edit;
21mod folds;
22mod motion;
23mod position;
24#[cfg(feature = "ratatui")]
25mod render;
26mod selection;
27mod span;
28mod viewport;
29pub mod wrap;
30
31pub use buffer::Buffer;
32pub use edit::{Edit, MotionKind};
33pub use folds::Fold;
34pub use motion::is_keyword_char;
35pub use position::Position;
36#[cfg(feature = "ratatui")]
37pub use render::{BufferView, Gutter, Sign, StyleResolver};
38pub use selection::{RowSpan, Selection};
39pub use span::Span;
40pub use viewport::Viewport;
41pub use wrap::Wrap;