Tables
A table lines up details side by side: a packing list by person, a timetable, a comparison. You edit it like a grid, and behind the scenes it’s ordinary Markdown, so it exports cleanly and stays readable anywhere.
Insert a table
Choose Format › Table or press ⌥⌘T. Varlig inserts a small table and puts you in its first cell, with Column 1 selected so you can type a heading straight away.
To edit a table that’s already in a note, click a cell.
Move around a table
While you’re typing in a cell:
| Key | What it does |
|---|---|
| Tab | Moves to the next cell. Past the last cell, it adds a row. |
| Shift-Tab | Moves to the previous cell. From the first cell, it returns to the note. |
| Return | Moves to the cell below. In the last row, it adds a row. |
| Escape or ⌘↩ | Returns to the note. |
| ⌘Z and ⇧⌘Z | Undo and redo, as anywhere in the note. |
Bold, italic, links (⌘K), note links (⌘D) and the date shortcuts work inside cells too.
Add and remove rows and columns
These shortcuts work while you’re typing in a cell:
| Action | Shortcut |
|---|---|
| Add a row below | ⌃⌘↓ |
| Add a column after | ⌃⌘→ |
| Delete the row | ⌃⌘⌫ |
| Delete the column | ⌃⇧⌘⌫ |
The header row and a table’s last remaining column can’t be deleted.
Right-click a cell for more: add a row above or below, add a column before or after, move rows up and down or columns left and right, set the column’s alignment, or copy the whole table as Markdown, CSV or HTML.
Select several cells
While you’re typing in a cell, hold Shift and press an arrow key to select a block of cells from that one: ⇧↑ and ⇧↓ straight away, ⇧← and ⇧→ once the caret is at that end of the cell’s text or the whole text is selected. Shift-clicking another cell, or dragging from one cell into another, does the same. The block is tinted and outlined.
With a block selected:
| Action | What happens |
|---|---|
| Copy (⌘C) | Puts the cells on the clipboard as tab-separated text, which Numbers, Excel and Google Sheets paste as cells, and as a Markdown table, which pastes into a note as a table. A block below the header row brings the column headings along. |
| Cut (⌘X) | Copies the cells, then empties them. |
| Delete | Empties the cells. |
| Paste (⌘V) | Fills cells from the block’s top-left cell and selects what it filled. A single line without tabs replaces the top-left cell’s text. |
Cut and Delete are one undo step each and keep the rows and columns. Right-click a cell in the block for Copy Cells, Cut Cells and Clear Cells at the top of the menu; in a read-only note only Copy Cells works.
Typing replaces the text of the cell you started from. A click, any other key, Select All or Escape ends the selection, and a second Escape returns to the note.
Paste from a spreadsheet
Copy a block of cells from Numbers, Excel or a CSV file and paste it into a table: the rows and columns land in the cells, not as one lump of text. Quoted CSV fields keep their commas and line breaks.
Copy a table out
Right-click a table for Copy Markdown, Copy CSV, Copy HTML and Copy TSV — TSV is the one spreadsheets expect. These stay available in read-only notes.
Column widths
The same menu has Column Width with Narrow, Default, Wide and Fit Content. Varlig remembers a width you set in a comment line under the table, which stays out of your way while you write and out of exports:
| Item | Cost |
| --- | --- |
| Tent | £100 |
<!-- {"columnWidths":["narrow","default"]} -->
Because it’s part of the file, the width travels with the note to another Mac.
Tables in Markdown
A table is rows of cells separated by |, with a line of dashes under the header row. Colons in that line set each column’s alignment:
| Room | Paint | Tins |
| :------- | :-------: | ---: |
| Kitchen | Sage | 2 |
| Bedroom | Warm grey | 3 || Room | Paint | Tins |
|---|---|---|
| Kitchen | Sage | 2 |
| Bedroom | Warm grey | 3 |
| Separator | Alignment |
|---|---|
:--- |
Left |
:---: |
Centre |
---: |
Right |
--- |
Default |
You don’t need to line the | characters up; Varlig reads the table either way.