The find-in-files UI on top of the search.grep engine. A FindInFilesController drives search.grep, accumulates streamed search.match events (scoped to the active searchId, stale ids ignored) grouped by file, and opens a match in the editor at its line. The SearchPanelView contributes a sidebar tab: a debounced query box, regex + case toggles, include/exclude glob fields, and a grouped results list with the matched span highlighted. findInFiles.open (Ctrl/Cmd+Shift+F) reveals and activates the search tab. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
92 lines
3.0 KiB
YAML
92 lines
3.0 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
|
|
|
|
# -- Find in files ----------------------------------------------------
|
|
- intent: findInFiles.open
|
|
keys: [ctrl+shift+f, meta+shift+f]
|
|
|
|
# -- 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]
|