Skip to content

The agent that grows with you

feat(cli): add display.vim_mode config and register /vim command

Sam Foreman2a5373da2cdc
diff --git a/hermes_cli/commands.py b/hermes_cli/commands.py
index 5bc9eabeb4f..853ee6c48c6 100644
--- a/hermes_cli/commands.py
+++ b/hermes_cli/commands.py
@@ -163,6 +163,9 @@ COMMAND_REGISTRY: list[CommandDef] = [
CommandDef("battery", "Toggle a color-coded battery indicator in the status bar",
"Configuration", cli_only=True, args_hint="[on|off|status]",
subcommands=("on", "off", "status")),
+ CommandDef("vim", "Toggle vim keybindings in the input composer",
+ "Configuration", cli_only=True, args_hint="[on|off|status]",
+ subcommands=("on", "off", "status")),
CommandDef("timestamps", "Toggle [HH:MM] timestamps on messages and /history", "Configuration",
cli_only=True, args_hint="[on|off|status]",
subcommands=("on", "off", "status"), aliases=("ts",)),
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index 270ca09f670..3a5be263597 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -837,6 +837,9 @@ DEFAULT_CONFIG = {
# fights terminal auto-scroll in non-fullscreen mode.
# See #45592.
"cli_refresh_interval": 1.0,
+ # Vi/vim keybindings in the CLI input composer (toggled by /vim).
+ # Off by default, preserving prompt_toolkit's standard emacs bindings.
+ "vim_mode": False,
"user_message_preview": { # CLI: submitted user-message lines echoed to scrollback
"first_lines": 2,
"last_lines": 2,