doc: Remove ideas for marks and registers from plans.

This commit is contained in:
2026-03-14 13:56:22 -04:00
parent 2e29dfc103
commit 18c66ca7a9
2 changed files with 44 additions and 26 deletions

View File

@@ -80,7 +80,7 @@ There are two ways to respond to them: **exec hooks** and
| `on-select` | User confirms (Enter) | Apply the choice | | `on-select` | User confirms (Enter) | Apply the choice |
| `on-cancel` | User cancels (Escape) | Revert preview | | `on-cancel` | User cancels (Escape) | Revert preview |
| `on-filter` | Filter text changes | Dynamic item reloading | | `on-filter` | Filter text changes | Dynamic item reloading |
| `on-mark` | User marks/unmarks an item | Visual feedback | | `on-toggle` | User toggles an item's selection | Visual feedback (deferred) |
### Exec Hooks (fire-and-forget) ### Exec Hooks (fire-and-forget)
@@ -383,16 +383,14 @@ designed.
| `Ctrl+D` / `Ctrl+U` | Half-page down / up | | `Ctrl+D` / `Ctrl+U` | Half-page down / up |
| `Ctrl+F` / `Ctrl+B` | Full page down / up | | `Ctrl+F` / `Ctrl+B` | Full page down / up |
| `/` | Enter filter (insert) mode | | `/` | Enter filter (insert) mode |
| `n` / `N` | Next / previous filter match | | `Space` | Toggle select + move down (`--multi`) |
| `m{a-z}` | Set mark at current position | | `V` | Enter visual line mode (`--multi`) |
| `'{a-z}` | Jump to mark | | `u` | Undo last selection change (`--multi`) |
| `"a` | Select into register `a` | | `U` | Clear all selections (`--multi`) |
| `v` | Toggle multi-select on current item | | `Ctrl+R` | Redo selection change (`--multi`) |
| `V` | Visual line select mode |
| `Enter` | Confirm selection | | `Enter` | Confirm selection |
| `Escape` | Cancel and exit | | `Escape` | Cancel and exit |
| `q` | Cancel and exit | | `q` | Cancel and exit |
| `Space` | Toggle select current item and move down |
`H`/`M`/`L` (viewport-relative jumps) are deferred. They're `H`/`M`/`L` (viewport-relative jumps) are deferred. They're
nice-to-have but not essential for the first pass of vim nice-to-have but not essential for the first pass of vim
@@ -400,12 +398,26 @@ navigation.
### Multi-Select ### Multi-Select
- `Space` or `v` toggles selection on current item Requires `--multi` flag. Without it, toggle/select actions
- `V` enters visual line mode, moving up/down selects ranges are no-ops and confirm always returns a single item.
- All selected items are emitted on confirm
- `"a` through `"z`: select into named registers (like vim - `Space` or `Tab` toggles selection on the cursor item and
yanking) moves down. `Shift+Tab` toggles and moves up.
- Registers can be recalled or included in output - `V` enters visual line mode: `j`/`k` extend the range,
`Space`/`Enter` force-selects the range and returns to
normal mode, `V` cancels back to normal with no change.
- `u` undoes the last selection change, `Ctrl+R` redoes.
Undo/redo stacks track snapshots of the full selection set.
- `U` clears all selections (undoable).
- Selections survive filter changes. Toggling item "foo",
then filtering to something else, then confirming still
includes "foo" in the output.
- `--selection-order` flag: output items in the order they
were selected (insertion order) instead of the default
input order.
- Confirm with selections: outputs all selected items.
Confirm with no selections in multi mode: falls back to
the cursor item as a single-element result.
### Drill-Down ### Drill-Down
@@ -479,7 +491,7 @@ A few built-in themes ship with pikl. `--theme monokai` or
## Sessions ## Sessions
`--session name` persists the menu's state (filter text, `--session name` persists the menu's state (filter text,
scroll position, selected items, marks, registers) across scroll position, selections) across
invocations. State lives in invocations. State lives in
`~/.local/state/pikl/sessions/`. `~/.local/state/pikl/sessions/`.

View File

@@ -170,19 +170,26 @@ through hooks and structured I/O. A handler hook can
receive hover events and emit commands to modify menu receive hover events and emit commands to modify menu
state. state.
## Phase 4: Multi-Select & Registers ## Phase 4: Multi-Select
Power selection features. Selection with undo/redo. No marks or registers: filtering
already handles navigation, and selections surviving filter
changes covers the register use case.
**Deliverables:** **Deliverables:**
- Space to toggle select, V for visual line mode - `--multi` flag to gate all multi-select behaviour
- Multi-select output (multiple JSON lines) - `Space`/`Tab` toggle-select, `Shift+Tab` toggle-up
- Named registers (`"a` through `"z`) - `V` visual line mode (force-select ranges)
- Marks (`m{a-z}`, `'{a-z}`) - `u`/`Ctrl+R` undo/redo selection changes, `U` clear all
- `--multi` flag to enable multi-select mode - Selections survive filter changes (tracked by original index)
- `--selection-order` flag for insertion-order output
- Multi-item output: one JSON line per selected item
- Action-fd commands: toggle-select, select-all, deselect-all,
undo-selection, redo-selection
- Test DSL: `multi` fixture, `selected_items` assertion
**Done when:** You can select multiple items, store them **Done when:** `seq 1 20 | pikl --multi`, toggle a few items
in registers, and get them all in the output. with Space, confirm, and all selected items appear on stdout.
## Phase 5: Table Mode & CSV ## Phase 5: Table Mode & CSV
@@ -204,8 +211,7 @@ Persistence and external control.
**Deliverables:** **Deliverables:**
- `--session name` for state persistence - `--session name` for state persistence
- Session state: filter, scroll position, selections, - Session state: filter, scroll position, selections
marks, registers
- Session history log file - Session history log file
- Unix socket IPC while running - Unix socket IPC while running
- IPC commands: push/remove/update items, set filter, - IPC commands: push/remove/update items, set filter,