Skip to content

TUI Navigation & Views

vaste-tui shows a file in one of four views. This page covers each view, how to move through it, and how to change the encoding and reload the file. For search and marks, see TUI search and marks.

vaste-tui picks the first view from the file type, as the desktop app does. See Supported formats.

File type First view Title line
Text Text [TEXT]
CSV and TSV Table [CSV]
NDJSON NDJSON [JSON]
Binary Hex [HEX]

To switch views:

  • t shows Text view, and x shows Hex view.
  • Tab goes from Text view to Hex view, then to the table or NDJSON view if the file has one, and back to Text view.

There is no key that goes straight to the table or NDJSON view: use Tab. When you switch between Text view and Hex view, the view keeps your place in the file. The table view keeps its own position.

These keys scroll every view. In the NDJSON view they move the focus from record to record, and the view follows.

Key Action
j, Down One line down
k, Up One line up
d, u Half a screen down or up
Page Down, Page Up One screen down or up
g, Home Start of the file
G, End End of the file

To go to a line, a byte offset, or a time, use the : commands.

Text view shows the file’s lines, with the line number on the left. While vaste-tui reads the file for the first time, it shows Indexing file....

  • Long lines: Text view cuts them at the right edge of the terminal and ends them with [+N], where N is the number of bytes not shown. Text view does not wrap lines or scroll sideways, and it shows at most the first 2,000 bytes of a line.
  • Invalid bytes: bytes that are not valid in the file’s encoding show as �.
  • Log-level colors: lines are tinted by their log level: errors red, warnings yellow, info cyan, and debug and trace gray. Press L to turn the colors off or on. vaste-tui remembers the choice. See Log levels and highlighters for how the level is found.
  • Timestamps: when the file’s lines start with a known timestamp format, the footer shows the time of the top line after the line number.
  • Marks and new lines: a mark shows its letter next to the line number, for example [a], and after a reload a green + marks the lines added to the end of the file.

Rows after the end of the file show ~.

Hex view shows the bytes of the file in rows: the offset of the row, the bytes as hexadecimal, and the same bytes as ASCII characters. Bytes that are not printable show as . in the ASCII column. The colors show the kind of byte:

Color Bytes
Gray Null (00)
Green Tab, line feed, carriage return, space, and other whitespace
Magenta Other control characters
Yellow 80 to FF

Press w to show 8, 16, or 32 bytes per row. vaste-tui remembers the choice. A row of 32 bytes needs a terminal about 140 columns wide. Hex view has no byte cursor: the footer shows the offset of the top row, for example 0x0001F400.

The table view shows CSV and TSV files as rows and columns, with the header row at the top. Without a header row, the columns are named Column 1, Column 2, and so on. The number on the left of each row is its position in the current view, so it changes when you sort or filter.

Column widths come from the first 50 rows, between 3 and 40 characters. A longer value is cut and ends with …. Press h or Left and l or Right to move between columns: the selected column’s name is bold.

The footer shows the row and column, for example Row 120/250,000 Col 3/8, and adds [F] when a filter is active and [S▲] or [S▼] when the table is sorted.

  • s sorts by the selected column in ascending order, and S in descending order. The column name shows ▲ or ▼.
  • c clears the sort.

Number columns sort by value, with empty and non-number cells last. Other columns sort by character code: uppercase letters before lowercase letters. While Vaste sorts, the table shows Sorting…. A file with more than 10,000,000 data rows cannot be sorted, and the error says so.

  1. Select the column, then press f or Enter. The footer shows filter[ followed by a column name and ]:.

  2. Type the text to look for and press Enter. Esc cancels.

The table then shows only the rows whose value in that column contains the text, ignoring case, and the footer shows [F]. The filtered column’s name starts with ●. Press F to clear the filter.

  • There is one filter at a time: a new filter replaces the previous one.
  • The name in the filter prompt can be the name of another column. The filter always applies to the selected column, marked with ● after you press Enter.

A sort and a filter combine: the filtered rows appear in sorted order, and the footer shows both [F] and [S▲] or [S▼].

Press i to show statistics for the selected column: Count (cells that are not empty), Nulls, Distinct (up to 100,000, then >100,000), Min, Max, Avg for number columns, and up to 5 sample values. The statistics cover the whole column, whatever the filter. Press any key to close them.

The table view has no search and no marks: switch to Text view for those. The last two rows of a file may not scroll into view. To see them, switch to Text view.

The NDJSON view shows one record per line, with the start of each line. The focused record has ▶ next to its line number. Press Enter to expand the focused record as formatted JSON, marked ▼, and press Enter again to collapse it. Several records can be expanded at once.

  • Keys show in cyan, strings in green, numbers in yellow, and true, false, and null in gray. Strings longer than 80 characters are cut with ….
  • Keys appear in alphabetical order, not in the order of the file.
  • An expanded record shows at most 20 lines, then … (truncated).
  • A line that is not valid JSON shows [invalid JSON] when you expand it.

The scroll keys move the focus from record to record. Search matches are not highlighted in this view.

Press e to open the encoding list. Type to narrow the list, move with Up and Down, and press Enter to reopen the file with the selected encoding. Esc closes the list. vaste-tui remembers the encoding for that file. See Encodings and line endings for how the encoding is detected.

  • The list always starts at UTF-8, not at the current encoding.
  • Lowercase j and k move the selection instead of filtering. To type them, use uppercase J and K: the filter ignores case.
  • The list does not scroll, so type part of the name to bring the encoding you want into view.

Press r to reload the file from disk. While it reloads, the footer shows ⠋ Reloading....

When another program changes the file, vaste-tui reloads it automatically. If you turned automatic reloads off with the auto_reload setting, the footer shows File changed — press r to reload instead. See TUI configuration.

After a reload, the search results, grep mode, and the table’s sort and filter are cleared. Marks and expanded NDJSON records stay. If the file changes again while a reload runs, vaste-tui does not reload it a second time: press r.