Using the Terminal UI

← Contents

The terminal UI (TUI) runs in a terminal, so you can browse tables on a remote server over SSH. It offers the same features as the GUI, including histograms; of the scatter plot, it shows the 2D density.

Starting

tableskim data.csv        # without a graphical display
tableskim -t data.csv     # force the terminal UI
tableskim-tui.exe data.csv   # Windows

The terminal UI starts automatically when there is no graphical display (see Getting Started). It shows exactly one file, given on the command line. Press q (or Ctrl+C) to quit.

The screen

The terminal UI

Press ? (or F1) at any time for the list of keys.

The help screen

Moving and selecting

KeyAction
Arrows, h j k lMove the cursor
PgUp / PgDn, Ctrl+B / Ctrl+FMove one page
g / G, Ctrl+Up / Ctrl+DownFirst / last row
Home / End, 0 / $First / last column
Shift+arrowsExtend the selection
vStart / stop selecting with cursor moves
Ctrl+ASelect all
EscClear the selection; while exporting or converting, cancel it instead
< / >Narrow / widen the column

The mouse also works: click a cell to move the cursor, double-click to show the cell in the sidebar, use the wheel to scroll, and click a sheet tab to switch sheets.

The sidebar: cell contents and statistics

Statistics of the City column in the sidebar

Histograms

Charts and Group By shows, with examples, how to read the charts and the Group By results.

B shows a histogram of the current column in place of the sheet. The title line summarizes what was counted, and each line is one bar with its range, count and percentage.

Histogram of the Salary column

KeyAction
↑ / ↓, k / jSelect a bar; its exact range is shown at the bottom
← / →, h / lHistogram of the previous / next column
EnterFilter the sheet to the rows of the selected bar
FClear the filter
Esc, B, qBack to the sheet

As in the GUI, numbers are counted into about 30 bins of round widths, dates into bins of whole days, months, years and so on, and text columns show their most frequent values. After Enter, the histogram is computed again for the rows left, so you can narrow down step by step; press Esc to see the filtered sheet.

Histogram of a date column

2D density

M shows how two columns relate, in place of the sheet: the first and last of the selected columns on the horizontal (X) and vertical (Y) axes, or else columns holding numbers or dates chosen as in the GUI: Y is the cursor's column or the nearest such one, X the nearest such one to its left. The plot is a grid of cells, each coloured by the number of rows whose X and Y values fall in it, from dark purple (few) to yellow (many); empty cells stay blank. The grid is sized to the terminal. The densest cell is selected first, and the line at the bottom shows its ranges and count. The title line also shows Pearson's correlation coefficient r, R² and the least-squares line of the rows plotted, as in the GUI.

2D density of two number columns

KeyAction
Arrows, h j k lSelect a cell
x / XNext / previous column on X
y / YNext / previous column on Y
tSwap X and Y
LLogarithmic / linear colour scale
EnterFilter the sheet to the rows of the selected cell
FClear the filter
Esc, M, qBack to the sheet

Y must hold numbers or dates, as for the GUI's scatter plot. The colours need a terminal with 256 or more colours.

When X holds text, each of its 30 most frequent values (and (other) for the rest) gets a line of its own, showing a box plot of its Y values: the whiskers ├──┤, the box ███ from the first to the third quartile, the median ┃ and outliers ∘, on a common scale. The line at the bottom shows the numbers of the selected category.

Box plots of Salary by City

Key (box plot)Action
↑ / ↓, k / jSelect a category
bThe density instead (a column per category); again: back
EnterFilter the sheet to the selected category

Group By

A counts the rows of the current sheet (sorted and filtered as shown) by the values of some columns and shows the result in a new sheet named Group By, as the GUI's Group By does. A dialog lists the columns: the selected ones (or the cursor's) are checked to group by.

The Group By dialog

KeyAction
↑ / ↓, k / jMove between the columns and the last line
g, SpaceGroup by the column (again: not)
aAggregate the column (again: not)
← / →, SpaceOn the last line: choose a function, turn it on or off
EnterGroup the rows
EscClose without grouping

The functions are count (non-empty values), distinct, sum, mean, min, max and std dev; each one makes a column for each aggregated column, after the group columns and count, the rows of the group. The status bar shows the progress, and Esc cancels. The sheet stays when the file is reloaded; grouping again replaces it.

Sorting

o sorts by the current column: ascending, then descending, then back to the file order.

Filtering

Chart selections are kept as Additional narrowing, ANDed with the editable conditions even in OR mode. In the filter editor, Ctrl+X removes only this additional narrowing; the existing clear-filter command (F on the sheet or chart) removes both. Further chart selections narrow the remaining rows again.

Quick filters

On a cell, = keeps only the rows with the same value in that column, and ! keeps only the rows with a different value. F clears the filter.

The filter dialog

f opens the filter dialog, which edits the same kind of filter as the GUI Filter pane.

The filter dialog

KeyAction
↑ / ↓Move between lines (the Match line, the conditions, "Add condition")
TabMove between the fields of a condition: column, operator, value
← / →Change the column or the operator; on the Match line, switch between all (AND) and any (OR)
typingEdit the value
Ctrl+NAdd a condition
Ctrl+DDelete the condition
Ctrl+UClear the value
Ctrl+XClear additional chart narrowing
EnterApply the filter (on "Add condition": add a condition)
EscClose without applying

The status bar shows how many rows match and the filter in use:

The filtered table

The operators and how values are compared are described in Sorting, Filtering, Searching and Statistics.

Searching

/ opens the search prompt at the bottom. Type the text and press Enter. Ctrl+R in the prompt toggles regular expression search. n / N move to the next / previous hit; the status bar shows the query and the hit number (/watanabe 1/20). An empty search clears the search.

Search hits highlighted

Going to a row, cell or column

Ctrl+G asks for a row (120), a cell (B12 or R12C2) or a column (its letter or name), as in the GUI.

Hiding and freezing columns

Column types and formats

The mark before a column name is judged from the first 1,000 rows read, as in the GUI: # numbers, @ dates and date-times, ? booleans; text and mixed columns have none.

% changes how the current column (or the selected columns) shows its values. The dialog also shows the column's type.

Line← / →, Space
Thousands separatorOn / off: 1234567.5 is shown as 1,234,567.5
Decimal placesAs stored, or 0 to 6 places (rounded)
Date format2024-01-31, 2024/01/31, 01/31/2024, 31/01/2024, 2024年1月31日, Jan 31, 2024

↑ / ↓ move between the lines, Delete resets the format, Enter applies it and Esc closes the dialog. Only the display changes: sorting, filtering, copying and exporting use the values as they are.

Copying

y or c copies the selection (or the current cell) as tab-separated text.

Copying uses the OSC 52 escape sequence, so it also works over SSH: the text goes to the clipboard of the computer where your terminal runs. The terminal must allow OSC 52; inside tmux, enable set-clipboard:

set -g set-clipboard on

Sheets

Tab / Shift+Tab (or ] / [) switch to the next / previous sheet. You can also click a tab.

Running SQL

For DuckDB, SQLite, Parquet and JSON files, : opens the SQL prompt.

The SQL prompt

The SQL result sheet

See Running SQL for details.

Exporting and converting

Progress is shown in the status bar; Esc cancels (instead of clearing the selection). Until it has finished, the file is not reopened: r, H, # and E ask you to wait, and Auto Revert waits. If the target file exists, TableSkim asks Overwrite? (y/n). See Exporting and Converting.

Editing cells

Cells of CSV / TSV and Excel files can be changed in edit mode only: I turns it on and off, and the status bar shows EDIT. Then Enter, i, F2 or a double click edits the cell in the status line, Delete clears the selected cells, pasting into the terminal fills the selected cells with tab-separated text, u / Ctrl+R undo and redo, and Ctrl+S saves the file. Edited cells are green and the file name starts with * until saved. Before unsaved changes would be lost (q, r, H, #, E, or leaving edit mode), TableSkim asks: y saves, n discards, Esc cancels. See Editing Cells.

Following a growing file

T follows the end of the file, like tail -f: the file is checked every second (with or without Auto Revert), and the cursor moves to the last row whenever rows are added. The status bar shows follow. For CSV / TSV files that are not compressed (in UTF-8 or Shift_JIS), only the appended lines are read, and a line being written is shown once it ends. Other files, and files that were rewritten rather than appended to, are reloaded. Press T again to stop following.

Other settings

KeyAction
HFirst row: switch between the guess and header / data (CSV / TSV / Excel)
#Skip lines starting with ## (on by default for VCF)
ESwitch the text encoding: UTF-8, UTF-16LE, UTF-16BE, Shift_JIS (CP932)
rRevert (reload the file)
RToggle Auto Revert (reload the file when it changes)
TFollow the end of the file as it grows (tail -f)
eShow the file in the file browser

When the rows of a large CSV / TSV file take a lot of memory, the status bar asks Continue reading? (y/n), like the GUI (see Supported File Formats).

Log messages are written only with --log <file>, because they would otherwise be drawn over the screen.

Key reference

See Keyboard Shortcuts for the full list.