Skip to content

feat(core,cli): M8 — keybindings.json + Vim mode state machine#26

Merged
oratis merged 1 commit into
mainfrom
feat/m8-keybindings-vim
May 28, 2026
Merged

feat(core,cli): M8 — keybindings.json + Vim mode state machine#26
oratis merged 1 commit into
mainfrom
feat/m8-keybindings-vim

Conversation

@oratis

@oratis oratis commented May 28, 2026

Copy link
Copy Markdown
Owner

DEFAULT_KEYBINDINGS (Emacs + Vim) · loadKeybindings/saveKeybindings · resolveKeyAction with Vim when-restriction · VimState class with multi-char chord buffering (gg). /keybindings + /vim slash commands. 18 new tests; 430 passing.

  · packages/core/src/keybindings/index.ts (NEW, ~210 lines)
    - DEFAULT_KEYBINDINGS: 6 Emacs-style + 11 Vim defaults
    - loadKeybindings(home) — reads ~/.deepcode/keybindings.json + merges
    - saveKeybindings(config, home)
    - resolveKeyAction(chord, bindings, opts) — chord lookup w/ Vim `when`
    - normalizeChord() — modifier-order-insensitive normalization
    - VimState class — NORMAL/INSERT/VISUAL state machine with multi-char
      chord buffering (e.g. `gg`)
  · packages/core/src/keybindings/index.test.ts — 18 tests

  · apps/cli/src/commands.ts
    - /keybindings — lists configured bindings + path to override file
    - /vim — toggles config.vim and persists to ~/.deepcode/keybindings.json

Tests: core 365 → 383 (+18); cli 47 (commands unchanged, /keybindings + /vim
are slash registry entries verified via the existing list() test).
Total 412 → 430 passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit e4397ba into main May 28, 2026
@oratis oratis deleted the feat/m8-keybindings-vim branch May 28, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant