feat(vault-tui): tui.vim — vim jump motions#20
Merged
Merged
Conversation
Opt-in `tui.vim`: on top of the default hjkl, the browser gains gg (top), G (bottom), and Ctrl-d/Ctrl-u (half-page). Because `g` becomes the gg-prefix in vim mode, the generator overlay moves from `g` to Ctrl-g; non-vim mode is unchanged (g = generator). - vault-config: tui.vim key ([tui] table, bool) — TUI-only, not relayed to the agent (mirrors ui.reduced_motion). - vault-tui: App.vim + pending_g; move_top/move_bottom/page_up/page_down (focus-aware, re-masking, fixed VIM_PAGE step — the pure-render App has no viewport height); handle_normal_key vim intercept before the modifier-less g/u/d arms; load_app sets app.vim from config. Completes the PRD §7.1 config registry. Tests: vault-config round-trip / reject / not-an-agent-flag; vault-tui jump + clamp + empty-list no-op + the gg arm/take sequence. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Opt-in
tui.vim(the last tracked config key). On top of the defaulthjklnavigation, the browser gains the vim jump motions:
gg→ top,G→ bottomCtrl-d/Ctrl-u→ half-page (a fixed step — the pure-renderApphas noviewport height)
Because
gbecomes theggprefix in vim mode, the generator overlay movesfrom
gtoCtrl-gwhile vim mode is on. Non-vim mode is unchanged (gopens the generator). Decided with the user.
How
vault-config:[tui]table +tui.vim(bool) — a TUI-only preference,read by
vault-tuidirectly (not relayed to the agent), mirroringui.reduced_motion.vault-tui:App.vim+ apending_ggg-prefix flag; new focus-awaremotions
move_top/move_bottom/page_up/page_downreusing the existingmove_*re-masking pattern.handle_normal_keyintercepts the vim keysbefore the normal match (which matches
g/u/dwithout checkingmodifiers, so
Ctrl-d/Ctrl-uwould otherwise alias delete/copy-username).load_appsetsapp.vimfrom config.This completes the PRD §7.1 config registry.
Tests
vault-config:tui.vimround-trip / rejects non-boolean / asserted never anagent flag.
vault-tui:move_top/move_bottomland on first/last,page_*clamp tobounds,
move_bottomon an empty list is a no-op, and theggprefixarms-once-then-fires.
Local CI-exact gates all green:
fmt, fresh isolatedclippy -D warnings(the new
Appbools needed a reasoned#[expect(struct_excessive_bools)]—they're independent toggles, not a state enum),
cargo test --workspace --all-targetsunderRUSTFLAGS=-D warnings,cargo deny check(no new deps),both headless builds.
🤖 Generated with Claude Code