Skip to content

TUI composer: native Vim modal keymap (opt-in, composer-only) #12508

@gh-xj

Description

@gh-xj

Summary

Add an opt-in native Vim modal keymap for the TUI composer input box.

Context

Issue #2387 was resolved by external-editor workflow (Ctrl+G), which is useful, but this request is different: native in-composer modal editing for short iterative turns without leaving the input box.

Problem

For terminal-first Vim users, switching to an external editor for many short edits introduces context switches and slows prompt iteration.

Proposal (narrow scope)

  • Composer input only (no global/full-app Vim behavior).
  • Keep default behavior unchanged (standard).
  • Add opt-in vim mode via config and runtime command.
  • Show minimal mode indicator in composer UI.
  • Non-goal: full Vim parity.

UX / Config

  • Config: [tui] keymap = "standard" | "vim" (default standard)
  • Runtime: /keymap standard and /keymap vim
  • UI: mode indication in composer (and clear normal-mode affordance)

Why this is low risk

  • Backward compatible default.
  • Explicit opt-in.
  • Isolated to composer input behavior.

Prior Art

Human + AI calibration notes (for reviewer context)

  • Scope was intentionally constrained before coding (composer-only, opt-in).
  • Iteration focused on compatibility and testability (default unchanged, explicit command surface, bounded semantics).
  • Proposal is ready to be adopted incrementally if maintainers choose to implement internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions