Skip to content

Opening and viewing files

Open a file from the tree, the palette or the diff, see what changed, and use the image, PDF, CSV, notebook and Mermaid viewers.

View Markdown

Three ways to open

Path What happens
Single click on the tree row Opens in preview — a tab that will be replaced when you open another file
Double click on the tree row Opens as a permanent tab
“Go to file” palette Opens the chosen file for editing

The difference between preview and permanent tab is what keeps the tab bar from filling up while you browse the tree.

The file type decides the viewer. A binary file does not open as text: the opening reports that it was not opened and which type was recognized, instead of showing unreadable content.

View a file’s diff

  • The diff starts from the project’s git and compares the file before and after the change.
  • By default, the diff is of unstaged changes. There is an option to open the diff of what is already staged.
  • Binary files produce no text diff: the opening reports the type, instead of trying to compare bytes as lines.

The same diff can be opened in the Inspector’s side panel, in read-only mode. The panel title shows the path and indicates when the diff is of what is staged.

Viewers

File type What the tab offers
Image Viewer with zoom and navigation, with an option to enlarge
PDF Reader with search
CSV / TSV Read-only table
Notebook (.ipynb) Its own viewer for the format
Mermaid Rendered diagram

Two details that explain strange behaviors:

  • CSV and notebook reuse the editor’s mode slot, with their own metadata — that is why the mode switcher changes labels depending on the file. In CSV, that mode does not edit: it is a table.
  • An image can be compared in a diff, with both sides on screen.

Limits

  • Viewers for large data depend on each one’s rendering limit; there is no promise of opening any size.
  • Files not supported by the tree for “open in browser” produce a notice instead of opening — the supported type list is the one the app knows.
  • Opening a file does not create a copy: you are looking at the workspace’s file.

On the command line

Opening a file and opening its diff also have commands, with explicit workspace selection — useful when the current directory is not the project’s. See Files command reference.