hjkl-buffer
Rope-backed text buffer with cursor, edits, motions, folds, viewport, and search.
Core text storage layer for the hjkl workspace. Provides vim-shaped buffer
semantics — charwise/linewise/blockwise selection, motions matching vim edge
cases (h no-wrap, $ clamp, sticky col on j/k), folds, viewport, and
search. Extracted from
sqeel-buffer with
full git history.
Status
0.2.0 — frozen public API; see IMPLEMENTERS.md for the
14-method sealed surface.
Features
ratatui(optional, default off): re-exportsStyleand styled-span helpers wired through ratatui. Pull this in only when consuming from a ratatui frontend; otherwise the buffer is UI-agnostic.
Usage
= "0.2"
use ;
let mut buf = from_str;
assert_eq!;
assert_eq!;
assert_eq!;
// Move cursor to second row
buf.set_cursor;
assert_eq!;
// Replace all content
buf.replace_all;
assert_eq!;
License
MIT. See LICENSE.