Commit Graph

3 Commits

Author SHA1 Message Date
teknium1
08a2e7dbcc refactor(cli): vim mode is a config key only — drop the /vim slash command
Maintainer ruling: no new slash command for this. `display.vim_mode: true`
in config.yaml enables vi keybindings in the composer at startup; the
NORMAL/INSERT/REPLACE status-bar label stays. Removes the CommandDef, the
handler, its dispatch-table entry and slash-command docs; documents the key
under Display Settings.
2026-09-12 22:00:02 -07:00
Sam Foreman
968fdc4746 fix(cli): apply /vim salvage to decomposed layout, trim tests, docs
- Relocate _handle_vim_command and _vim_mode_label onto
  cli_status_bar_mixin.py (the mixin owning status-bar commands and
  rendering) — the original targeted pre-decomposition cli.py; slash
  dispatch picks the handler up by naming convention
- Wire the vim label into the current status-bar fragment builder
- Trim tests to 3 invariant tests per the salvage bar
- Document /vim in reference/slash-commands.md

Live E2E (tmux + PTY, temp HERMES_HOME): /vim toggles on, Esc/i flip
NORMAL/INSERT in the status bar, /vim off restores emacs bindings,
display.vim_mode persisted to config.yaml.
2026-09-12 22:00:02 -07:00
Sam Foreman
1571752a70 test(cli): cover /vim toggle, persistence, and status label
Adds 11 tests for the vim mode surface:

- /vim status reports without persisting
- bare /vim toggles; on|off set explicitly; each persists to
  display.vim_mode
- editing_mode is applied to a running Application in both directions
- a missing Application is not fatal (toggle before the TUI starts)
- invalid arguments leave state untouched and print usage
- _vim_mode_label() maps vi input modes to NORMAL/INSERT/REPLACE and
  stays empty when disabled or before the app exists
- the config default is off and /vim is registered with subcommands
2026-09-12 22:00:02 -07:00