cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

cat/module-path
012 / docs / sheets / editing.md
editing.md 3.5K rendered
1---2title: "Editing"3sidebar_position: 24---56# Editing78## Selection910Shift+arrows, a mouse drag or Shift+click select a range; Ctrl+arrows jump11to the edge of the data (add Shift to select as you go); Ctrl+A selects the12data around the active cell, then everything; Ctrl+Space and Shift+Space13select whole columns and rows. The active cell stays distinct from the rest14of the selection, and the status line shows Sum, Avg and Count, dropping the15ones that don't fit on a narrow terminal.1617![A column selected, with its Sum, Avg and Count on the status line](../media/selection-stats.png)1819## Copy, paste and fill2021Ctrl+C, Ctrl+X and Ctrl+V work as in Sheets: relative references shift,22absolute ones don't, cut and paste moves cells and the formulas that point23at them follow. Ctrl+Shift+V pastes values only, keeping the destination's24formats.2526Formats travel with the cells. A pasted or moved cell shows what its27source showed, whether the format was the cell's own or came from its28row, its column or the whole sheet, and pasting plain cells into a29currency column leaves them plain. Whole columns or rows (Ctrl+Space,30Shift+Space) copied and pasted at the top of a column, or the start of a31row, take their column or row formats along, so a pasted column is32currency all the way down, not only where it had data; cut and pasted,33they move them, leaving the source columns plain. Pasted anywhere else,34they paste as a block of the cells that hold something. A block cut and35pasted leaves the cells it came from plain, as Sheets does, even where36a formatted column or row crosses them. Vim's `yy` and `dd` copy whole37rows, so `p` and `P` bring their row formats along. Formulas reading38a column whose format changes, blank cells included, show the new format39at once (`=B5*2` shows currency when column B becomes currency). Copies also go to the40system clipboard as tab-separated text (OSC 52, so it works over SSH), and41pasting tab-separated or multi-line text from the terminal fills a block.4243Ctrl+D and Ctrl+R fill down and right. The fill handle, shown when you hover44the corner of the selection, can be dragged to continue a series: 1, 2, 3;452, 4, 6; Jan, Feb; Mon, Tue; dates by day or month; Item 1, Item 2. Ctrl+Enter46while typing enters the same entry into every selected cell.4748## Undo4950Ctrl+Z undoes and Ctrl+Y or Ctrl+Shift+Z redoes, 100 steps deep (fewer51when steps are very large, the oldest dropped first: see52[Bounds of support](../contributing/limits.md#undo)), across every sheet: undo shows the sheet a step changed. Every change is covered:53typing, clearing, paste, fill, sort, insert and delete, formats, widths,54names, charts, freeze, filters, pivot tables, and adding, deleting,55renaming, moving and duplicating sheets. A multi-cell change is one step,56and the context line says what was undone, e.g. `Undid: clear B3:B5`.57A change whose undo would take more than 1 GB of memory (clearing58millions of formulas at once) asks first: Enter makes it without undo,59forgetting the steps before it, and Esc backs out.6061## Rows and columns6263Insert and delete rows and columns from the Insert and Edit menus, the64right-click menus, or Ctrl+Alt+= and Ctrl+Alt+- (rows, or columns when whole65columns are selected). Formulas, names, charts, filters and widths follow.66Widths and the formats of whole columns and rows are in67[formatting](formatting.md).6869## Links7071Cells that hold an `http`, `https` or `mailto` URL, and `=HYPERLINK(url,72[label])`, are terminal hyperlinks (OSC 8): Cmd- or Ctrl-click opens them in73terminals that support it.