Repository navigation
v0.12.0
Tables are cell-based: a current column, per-column widths, and V for rows.
Tables are cell-based, like o-csv's grid: a current column, column widths, and a visual row selection.
Tables
- A list with columns has a current column (
List.Column,SetColumn;columnin its state). On thelistnoun in normal mode, on a cell-mode table only:h/l/left/rightmove by column (counts),0/^/homeand$/endgo to the first and last,N|to column N,g cchooses one from a chooser of the titles (list.column,list.choose-column, motions);j/kkeep the column. Every frame scrolls the column offset as little as shows the current column;z l/z hcarry it along.$,^and0no longer runlist.scroll-columns;list.columnscrolls a row-select table the same way. Storiestables/cell-motion,tables/column-count. - The current cell is drawn reverse and underlined inside the row's highlight, the header underlines the current column's title, and an unfocused table fades both. Story
tables/unfocused-cell-dimmed. yandYcopy the current cell, or the row's cells joined by tabs, into the registers (list.yank {what, register}).z >/z <widen or narrow the current column byColumnWidthStep(2) cells, never below 3;z =makes every column automatic (list.resize-column,list.reset-columns;List.SetColumnWidth,ColumnWidths,ResetColumnWidths). The widths and the current column are remembered per table id in the state directory'stables.json(Runtime.TableState,SetTableState). Storytables/column-resize.Vstarts a visual row selection drawn into the marks:j/kextend it (they clamp), a row's application verb runs for every selected row throughlist.apply,escorVends it and the marks go back (list.visual,List.Visual,StartVisual,EndVisual). Storytables/visual-apply.list.applytakesargsfor every row's request, and a verb with a confirm asks once for all the rows.RowSelect()keeps a table on row selection: trees' lists (h/l expand and collapse), the?help modal and the Settings page use it.- y, Y, V and the width keys are hidden from the footer;
?help lists them. - cli: the groups rail's
h/leftback rows take the new guardlist-first-column, so in a tablehmoves left and goes back to the rail from the first column. Storycatalog/groups-table-h.
grid
- Per-column widths:
z >/z </z =on the grid noun (grid.resize-column,grid.reset-columns;Grid.SetColumnWidth,ColumnWidth,ColumnWidths,ResetColumnWidths). A given width replacesMaxCellWidthfor its column and is remembered under the grid's id.
o-story
- Goldens read
C|(c|dimmed) for a highlighted row that holds a table's current cell; the expect fieldcellnames the current cell's text.