- commit
- af4eda8871d0d584342d0bfd8e11584dfdbe0608
- parent
- cc5f068694f8f7db482031fd5491259f7b12ace6
- author
- Dami <dami.etoile@gmail.com>
| M | README.md | 4 | +- |
| M | ROADMAP.md | 2 | +- |
| M | docs/ | 2 | +- |
| M | docs/ | 62 | +++++++++++++++++++++++++++++- |
@@ -54,7 +54,9 @@ searches every command.
5454 and cached ([docs](docs/jev.md)).5555 - **Made for terminals.** Mouse with hover and resize handles, hyperlinks,5656 light and dark themes that follow the terminal, desktop notifications,57- menus and a command palette styled like terminal software, not a GUI.57+ menus and a command palette styled like terminal software, not a GUI,58+ and optional vim keys (hjkl, counts, dd/yy/p, visual selection, `:`59+ commands) in File > Settings.5860 5961 ## Demos6062 @@ -38,7 +38,7 @@ quality keep pace with features: see [docs/UX.md](docs/UX.md).
3838 | One-key frozen titles | csvlens, sc-im, 1-2-3 /Worksheet Titles | viewport split | S-M |3939 | Search (`n`/`N`) and non-destructive row filter | csvlens | | M |4040 | Fill down / fill series (1,2,3, Jan, Feb) | Excel, Sheets | needs Copy ref adjustment | S-M |41-| Optional vim keymap (`hjkl`, counts, `:` commands) | sc-im, csvlens | `bubbles/v2/key` bindings | M |41+| Optional vim keymap (`hjkl`, counts, `:` commands). Done: File > Settings > Vim keys, [keys.md](docs/keys.md#vim-keys) | sc-im, csvlens | tables of command bindings, the command registry for `:` | M |4242 | Frequency table of a column as a derived sheet | VisiData Shift+F | | M |4343 4444 ## Phase 3: terminal-native features@@ -15,7 +15,7 @@ shows it is derived from the table rather than listing it again.
1515 | Registry | Entry | Derived from it |1616 |---|---|---|1717 | `sheet.FuncDef` | a function: name, signature, description, arity, eval | parsing, autocomplete, argument hints, help, [functions.md](functions.md) |18-| `ui.command` | an action: id, title, description, run, enabled, checked | key bindings, menu bar, context menus, palette, shortcuts help |18+| `ui.command` | an action: id, title, description, run, enabled, checked | key bindings (Sheets and vim), menu bar, context menus, palette, shortcuts help, the `:` command line and its completions |1919 | `fileio` formats (`formats.go`) | a format: name, extensions, labels, traits, importer, exporter | `Import`, `Export`, detection, import picker, File > Download, command line |2020 | `chart.types`, with `sheet.ChartTypes` | a type: name and order (sheet, saved in files), a layout drawing text and image (chart) | `chart.Draw`, `chart.Image`, chart editor, Insert > Chart |2121 | theme roles | a role: dark and light styles on the 16 ANSI colors | every style in the UI |@@ -6,8 +6,6 @@ Alt+letter) and the command palette (Ctrl+K), which shows each command's
66 shortcut. F1 or Ctrl+/ lists every binding, generated from the same table77 the app uses, so it never drifts from what the keys do.88 9-Inside the grid, 012 works like Google Sheets.10-119 | Key | Action |1210 |---|---|1311 | Type | Replace the cell. `=` starts a formula, `'` forces text; `$1,200`, `12%`, `9/26/2026` and `14:30` are numbers that keep their format |@@ -51,6 +49,66 @@ Inside the grid, 012 works like Google Sheets.
5149 | Click a chart, then Arrows / Shift+arrows / Del | Move, resize or delete it; drag the chart or its corner with the mouse; Enter edits it |5250 | Cmd- or Ctrl-click a URL | Open it: cells holding a URL, and `=HYPERLINK(url, [label])`, are terminal hyperlinks |5351 52+## Vim keys53+54+File > Settings > Vim keys (also `:settings.vim` or the palette) turns55+on a vim keymap in the spirit of sc-im and VisiData. It is off by56+default and belongs to you, not the sheet: it isn't saved in `.012`57+files, and File > New and Open keep it. The mode indicator says58+**NORMAL** where it would say READY, **VISUAL** while selecting with59+`v` or `V`, and **COMMAND** on the `:` line; typing into a cell is60+ENTER or EDIT, as always, and Enter, Tab or Esc there return to NORMAL.61+Keys vim doesn't take keep their Sheets meaning (arrows, Del, Ctrl+S,62+Ctrl+C/V, Alt+letter menus, F-keys); Ctrl+D, Ctrl+U and Ctrl+R are63+vim's, so fill down and fill right are in the Edit menu. F1 lists the64+vim keys first, and the menus and palette show them where Sheets' keys65+are taken.66+67+| Keys (NORMAL) | Action |68+|---|---|69+| `h` `j` `k` `l`, arrows | Left, down, up, right |70+| `w` `b` | Jump to the edge of the data, right or left (as Ctrl+arrows) |71+| `gg` `G` | First row, last row with data; with a count, that row (`12G`) |72+| `0` `^` `$` | Column A, the last filled cell of the row |73+| `H` `M` `L` | Top, middle, bottom row on screen |74+| Ctrl+D, Ctrl+U | Half a screen down, up |75+| A count (`5j`, `3dd`, `4x`) | Repeats a move or command, or says how many rows or cells an operator takes |76+| `i` `a`, Enter | Edit the cell, caret at the start or the end |77+| `=` | Start a formula |78+| `o` `O` | Insert a row below or above and start typing in it |79+| `x` | Clear the cell (with a count, that many to the right) |80+| `dd` `yy` | Cut or copy the row (with a count, that many rows); `p` pastes them back |81+| `p` `P` | Paste rows cut or copied with `dd` or `yy` as new rows below or above; other copied cells paste at the active cell |82+| `u`, Ctrl+R | Undo, redo |83+| `v` `V` | Select cells or whole rows (VISUAL); motions stretch the selection |84+| `/`, `n` `N` | Find (Enter stays on the match), next and previous match |85+| `gt` `gT` | Next, previous sheet |86+| `:` | The command line |87+| Esc | Cancel a count or sequence, leave VISUAL, deselect |88+89+In VISUAL mode `d` or `x` deletes the selection (whole rows with `V`,90+the cells' contents with `v`) and keeps a copy to paste, `y` copies it,91+`p` pastes over it, `o` goes to the other corner, and `v`, `V` or Esc go92+back to NORMAL.93+94+The `:` line takes:95+96+| Command | Action |97+|---|---|98+| `:B12`, `:Sheet2!A1`, `:C3:D9`, `:Sales` | Go to a cell, range or named range |99+| `:40` | Go to row 40 |100+| `:w`, `:w name`, `:w out.csv` | Save; save as; download as another format (`:w!` replaces without asking) |101+| `:q`, `:q!` | Quit (asking about unsaved changes), quit discarding them |102+| `:wq`, `:x` | Save and quit; `:x` saves only if something changed |103+| `:e name`, `:e!` | Open a sheet or import a file; refused with unsaved changes unless `:e!` |104+| `:edit.fill_down`, `:fill down` | Any command, by its ID or title |105+106+Completions for commands appear under the line as you type, drawn from107+the same registry as the menus and palette: Tab puts the highlighted108+one on the line (Tab again for the next, Shift+Tab back), Up and Down109+move, and Enter runs the line, or the highlighted completion when the110+line isn't a command itself (`:fill d` Enter fills down).111+54112 ## Mouse55113 56114 Click a cell to select it, drag to select a range, Shift+click to extend,