Opening Files
Each Vaste window shows one file at a time. Vaste opens files read-only and does not change them.
Open a file
Section titled “Open a file”When no file is open, the window shows the welcome screen. Open a file in any of these ways:
- Select Open file… or press
Ctrl + O, then choose a file. - Drag a file from your file manager and drop it on the window. If you drop several files, Vaste opens the first one.
- Select the drop zone (Drag & drop a file here) to open the same file chooser as Open file….
- Select a file in the Recent or Favorites list.
While a file is open, select Open file in the toolbar, press Ctrl + O, or drop a file on the window to open another file. The new file replaces the current one in the same window. If you cancel a prompt before the new file opens, for example the size prompt for a compressed file, the current file stays open.
Open a file in a new window
Section titled “Open a file in a new window”To keep the current file and open another one beside it, open the second file in a new window:
- On the welcome screen, select Open in new window.
- While a file is open, select New window in the toolbar, or select More actions (
…) → New window. - Press
Ctrl + Shift + N. - In the Recent or Favorites list, select the window icon on a row (Open in new window) to open that file without choosing it again.
Each window has its own file, view, and search. For how windows are saved and restored, see Sessions and windows.
Recent files and favorites
Section titled “Recent files and favorites”The Recent list on the welcome screen shows the last 20 files you opened, newest first. Each row shows the file name, its folder, and how long ago you opened it. When the list holds more than a few files, a Filter recent files… box appears above it.
Hover over a row to show its actions:
- Add to favorites (star): adds the file to the Favorites section above Recent. Favorites stay in that section however many other files you open later.
- Open in new window: opens the file in a new window.
- Remove from recent files: removes the file from the list after you confirm. The file stays on disk.
Clear removes every file from Recent after you confirm. Favorites are not affected.
If a file in the list no longer exists, its row shows Missing and cannot be opened. You can still remove it or change its star.
When Vaste has a saved session, the welcome screen also shows Resume last session, with the number of files in that session. See Sessions and windows.
Compressed files
Section titled “Compressed files”Vaste recognizes gzip, zstd, xz, bzip2, and zip files by their content, not by their file name extension. It decompresses the file to a cache folder and then opens the decompressed copy.
- Before it decompresses a large file, or one whose decompressed size it cannot tell in advance, Vaste asks for confirmation (Large compressed file). Select Decompress to continue. xz and bzip2 files do not record their decompressed size, so they always show the prompt. See The size prompt.
- If a zip archive contains more than one file, Vaste asks you to choose one (Choose a file in followed by the archive name). Type in the box to filter the list.
- While Vaste decompresses the file, a progress overlay shows how much has been read and written. Select Cancel or press
Escto stop.
If a decompressed copy of the file is already in the cache, Vaste opens it without asking. For details, see Compressed files. For the location of the cache, see Data and cache locations.
How Vaste picks a view
Section titled “How Vaste picks a view”Vaste chooses the first view for a file from its file name extension:
| File | First view |
|---|---|
.csv |
Table view, if Vaste finds a consistent delimiter. Otherwise, Text view. |
.tsv, .tab |
Table view |
.ndjson, .jsonl |
NDJSON view |
.txt, .log, .json, and other common text and code extensions |
Text view |
For any other extension, Vaste looks at the start of the file. A file that contains NUL bytes opens in Hex view. A file whose lines are JSON objects or arrays opens in NDJSON view. Any other file opens in Text view.
For the full detection rules, see Supported formats.
Switch views
Section titled “Switch views”Use the view switcher in the toolbar to show the same file in another view:
- Text and Hex are available for every file. Press
Ctrl + Hto switch between Text view and Hex view. - Table appears for CSV and TSV files, and for NDJSON files after you choose columns in the Schema panel. Press
Ctrl + T. - NDJSON appears for NDJSON files. Press
Ctrl + J.
Each view remembers where you were in it, so switching back to a view returns to the same place. The views do not follow each other: moving in Text view does not move Hex view. The exception is an NDJSON file and its table: switching between NDJSON view and Table view keeps the same record at the top.
Grep view is not in the switcher. It filters Text view to the lines that match a search. See Grep view.
Encoding
Section titled “Encoding”Vaste detects the encoding when it opens a file, and the status bar shows it. To open the file with a different encoding, select the encoding in the status bar. See Encodings and line endings.
The first open of a large file
Section titled “The first open of a large file”The first time you open a file, Vaste reads it from start to end and builds a line index, so that it can jump to any line right away. While Vaste builds it, the window shows Opening with the file’s name, a progress bar, and the number of lines counted so far. Select Cancel or press Esc to stop; the file does not open and any file that was already open stays open. Vaste keeps the index, so the next time you open the same file it opens quickly, unless the file has changed.
For where Vaste stores the index, see Data and cache locations. For size limits, see Limits.
Next steps
Section titled “Next steps”- Interface tour: the toolbar, status bar, sidebar, and command palette
- Text view: read and select lines
- Searching a file: find text in the open file