feat(vim): ex command-line overlay (:w :q :wq :x :e :N, ZZ) (T-407)
Under the Vim preset, `:` opens a transient one-line ex overlay running a fixed v1 table; ZZ runs :wq directly. Completes the last built child of the T-403 cross-pane vim layer (T-405 part 2 gt/gT still open). - ExLineController + parseExCommand grammar + editor-targeted executors (lib/kernel/src/ex_line.dart); the overlay (lib/widgets/src/ex_line_overlay .dart) reuses the quick-open chrome, mounts in the root_shell Stack, and publishes the exline.open scope flag. Unknown commands flash + stay open; with no active buffer every command no-ops (2026-06-13 decision). - :q closes the active tab via editor.close on its id — the registry promotes the next buffer and the split self-collapses on the last (2026-06-12 decision); :w/:wq/:x/ZZ save (+close) the active buffer. - :e <path> seeds quick-open (new QuickOpenController.open(seed:)); :N adds the editor.goto-line IPC/CLI verb (reuses _offsetForLine). Goto needs caret sync: EditorController now handles editor.selection-changed and the editor view moves the caret on a selection-only change. - `:` and ZZ are typed intents; the editor matcher and PaneKeyNav now bubble unhandled typed intents to the app-root Actions, so they fire from any focus. vim.yaml binds `:`, ZZ (shift+z shift+z), and Esc-dismiss. Tests: parser/controller/executors, editor.goto-line daemon tests, selection-changed (controller + view), full overlay widget test. make test green; analyze + format clean. Also files T-441 (drop bold from the ticket-id card label) and T-442 (sub-agent renders as 3 cards instead of one bundle) under the T-276 UI epic. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,11 @@ bindings:
|
||||
- intent: dismiss
|
||||
keys: escape
|
||||
when: quickOpen.open
|
||||
# Ex command-line overlay (T-407): Esc dismisses it back to normal mode (the
|
||||
# overlay's own EditableText handles Enter via onSubmitted).
|
||||
- intent: dismiss
|
||||
keys: escape
|
||||
when: exline.open
|
||||
- intent: findInFiles.open
|
||||
keys: [ctrl+shift+f, meta+shift+f]
|
||||
- intent: focus.nextPanel
|
||||
@@ -128,6 +133,18 @@ bindings:
|
||||
keys: [ctrl+w q, ctrl+w c]
|
||||
when: "vim.normal || vim.visual"
|
||||
|
||||
# ---- Ex command-line (T-407) -----------------------------------------
|
||||
# `:` opens the transient ex overlay (`:w` `:q` `:wq` `:x` `:e <path>` `:N`);
|
||||
# `ZZ` runs `:wq` directly. Both are typed app intents the editor's command
|
||||
# matcher and a pane's nav matcher bubble to the app-root Actions, so they
|
||||
# fire from any focus. Editor-targeted: no-op when no buffer is active.
|
||||
- intent: exline.open
|
||||
keys: shift+semicolon # :
|
||||
when: vim.normal
|
||||
- intent: exline.writeQuit
|
||||
keys: shift+z shift+z # ZZ
|
||||
when: vim.normal
|
||||
|
||||
# ---- Mode transitions ------------------------------------------------
|
||||
- intent: command:vim.mode.visual
|
||||
keys: v
|
||||
|
||||
Reference in New Issue
Block a user