NS8 slice: Implement composable objects, selections, and delimiter matching #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
OBJECTIVE: Implement the KEYMAP.md object grammar so verbs compose with word/line/indent/parameter/enclosing-form/delimiter objects instead of one-off bindings.
AUTHORITY: Parent #43; KEYMAP.md
Orthogonality rules,Object and match grammar; req: input/007, coding/001-005, testing/001-004.AGENT AUTHORITY:
PARENT: #43 via explicit issue link and parent checklist.
SCOPE: Selection state, text-object parser, delimiter/quote matching for
()[]{}and sensible quotes, indent-block detection, parameter/object detection using syntax data when available with text fallback, verb-object dispatch for select/delete/change/yank. Likely files: input/session/tui plus syntax helpers.BOUNDARIES: Do not create a full language parser if Tree-sitter/LSP data is unavailable; use safe textual fallbacks and clear unsupported diagnostics. Do not clone Vim text-object compatibility beyond KEYMAP.md intent.
ACCEPTANCE:
m mjumps to matching delimiter/quote; physical%is an alias where available.m sandm aselect inside/around the matched pair.m (,m {,m [, and quote variants choose the requested pair type.s w,s l,s i,s p,s f, ands dselect word, line, indent block, parameter, enclosing form/function, and diagnostic range where available.d,c,y, andsreuse the same object grammar; adding an object does not require duplicating each verb binding.VERIFICATION:
zig build testzig build v1-smokeBLOCKERS: none.
Completed in commit
30af1e9(Add composable object selections).What changed:
w,l,i,p,f, anddobjects.d/c/yoperator rails, so delete/change/yank compose instead of duplicating per-verb logic.m m,m s,m a, and explicit pair selectors such asm (/m {/ quotes, with escaped quote handling.Verification:
zig fmt src/session.zig src/tui.zig && zig build testzig buildzig build v1-smokezig build run -- --helpzig build run -- src/main.zigredgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.mdNotes: