Files
clide/assets/keymaps/default.yaml
T
jpmschweitzerandClaude Opus 4.8 0c7a6e86d5 add quick-open fuzzy file finder (Ctrl/Cmd+P)
A file picker overlay over the whole workspace, distinct from the
command palette. QuickOpenController holds the file list + a
subsequence fuzzy filter; the overlay loads the list via files.walk on
open, shows RecentFilesService entries on an empty query, and opens the
selection through a shared openWorkspaceFile helper (.md → markdown
reader bus, else editor.open) that the files panel now also routes
through, so recents stay in sync from every open site.

Bound to ctrl+p / meta+p with `when: !palette.open` so it never
collides with the palette's ctrl+p navigation; in-overlay arrows/enter/
escape reuse the palette's keymap-driven model via quickOpen.* intents.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 20:19:21 +02:00

88 lines
2.9 KiB
YAML

# clide default keymap.
#
# This is the baseline preset. Vim / VSCode / JetBrains presets are
# their own files (T-64/T-65/T-66) and replace bindings via the same
# YAML shape.
#
# Each binding:
# intent: <stable intent id> # see kernel/src/keymap/intents.dart
# keys: <chord> | [<chord>, ...] # `ctrl+shift+p`, `cmd+enter`, ...
# when: <when-clause> # optional; VS-Code-style boolean expr
#
# Identifiers in `when:` are scope flags published by producing
# services (e.g. `palette.open` when ClidePalette is mounted +
# visible). Missing flags evaluate to false.
name: default
bindings:
# -- Activation / focus -----------------------------------------------
# ActivateIntent has no when-clause: it dispatches via Actions.maybeInvoke
# against the focused context, so only widgets that opt in (ClideTappable's
# Actions wrapper) actually catch it. Text-input widgets handle Enter
# themselves first.
- intent: activate
keys: [enter, space]
- intent: dismiss
keys: escape
- intent: focus.next
keys: tab
- intent: focus.previous
keys: shift+tab
# Panel-to-panel cycling (sidebar → workspace → context).
# VS Code convention.
- intent: focus.nextPanel
keys: f6
- intent: focus.previousPanel
keys: shift+f6
# -- Command palette --------------------------------------------------
- intent: palette.open
keys: [ctrl+shift+p, meta+shift+p]
- intent: palette.selectNext
keys: [down, ctrl+n]
when: palette.open
- intent: palette.selectPrevious
keys: [up, ctrl+p]
when: palette.open
- intent: palette.accept
keys: enter
when: palette.open
- intent: dismiss
keys: escape
when: palette.open
# -- Quick open (fuzzy file finder) -----------------------------------
# ctrl+p / meta+p are free while the palette is closed; the palette
# only claims ctrl+p for selectPrevious `when: palette.open`, so this
# is conflict-free. Arrow/enter/escape inside the overlay are handled
# locally by the widget.
- intent: quickOpen.open
keys: [ctrl+p, meta+p]
when: "!palette.open"
# Nav stays on arrows/ctrl+n (not ctrl+p — that's the open chord and
# would collide while the overlay is up).
- intent: quickOpen.selectNext
keys: [down, ctrl+n]
when: quickOpen.open
- intent: quickOpen.selectPrevious
keys: up
when: quickOpen.open
- intent: quickOpen.accept
keys: enter
when: quickOpen.open
- intent: dismiss
keys: escape
when: quickOpen.open
# -- Text scale -------------------------------------------------------
# On most layouts `+` is `shift+equal`; we bind both so users who
# think of it as Ctrl+Plus and users who hit Ctrl+= both work.
- intent: text.scaleIncrease
keys: [ctrl+equal, ctrl+shift+equal, meta+equal, meta+shift+equal]
- intent: text.scaleDecrease
keys: [ctrl+minus, meta+minus]
- intent: text.scaleReset
keys: [ctrl+0, meta+0]