Editor & Viewer
When an agent finishes a change, you want to read it and decide if it’s right — without leaving the cockpit for VS Code. TermTree’s editor/viewer panel opens beside the terminal for that: there’s no file tree, because the terminal already is one, and no LSP, autocomplete, or debugger, because reviewing an agent’s output is a different job than writing code from scratch.
The terminal is your file explorer
TermTree has no file tree. Instead, the editor/viewer panel opens whatever file you point at in a terminal:
- ⌘/Ctrl-click any file path that appears in terminal output to open it.
- Paths written as OSC 8 hyperlinks (used by some tools and shells) are clickable the same way.
- Right-click a path for Open File / Open Folder — see Terminals.
There’s one global editor/viewer panel, shared across the whole app — opening a file from any terminal routes it into the same panel.
Editing and saving
Text files open in a CodeMirror editor with language detection for syntax highlighting. Edit normally, then save with Cmd+S / Ctrl+S. An unsaved file shows a dirty indicator next to its name.
Only one file can be dirty at a time. If you try to switch away from a file with unsaved changes — to another file, or by closing it — TermTree prompts you to save, discard, or cancel before proceeding.
When a file changes on disk
If the open file changes on disk (for example, an agent edits it in a terminal) while your buffer is clean, TermTree reloads it automatically — no prompt needed.
If your buffer is dirty when the file changes on disk, TermTree does not overwrite your edits. Instead it flags the file as “Changed on disk — Reload,” so you can review the external change and reload deliberately once you’ve dealt with your own edits.
Outline pane
For Markdown files, toggle the Outline pane to see a heading tree for the current file. Click a heading to jump to it; collapse and expand branches to navigate long documents.
Diff toggle
Click View changes to see a read-only diff of the open file against the last commit (git HEAD) — a quick way to review what an agent changed before deciding what to keep. The diff toggle only appears when the file actually differs from HEAD. Very large files are excluded, showing a size-limit notice instead of the diff.
PDF and image viewing
.pdf files and common image formats open in a dedicated read-only viewer instead of the text editor.
Back and forward navigation
The editor keeps a navigation history as you open files. Go to the previous or next file with Cmd+[ / Cmd+] (Ctrl+[ / Ctrl+], also available as Ctrl+Alt+Left / Ctrl+Alt+Right from the native menu on Windows/Linux).
Recent Files
Press Cmd+Shift+O / Ctrl+Shift+O to open the Recent Files dialog — a deduplicated list of files you’ve opened, capped at 15. It’s pruned to files that still exist on disk each time you open it, and persists across restarts.
Per-file view memory
TermTree remembers, per file path, which view mode you last used (Editor or Preview) and your scroll position in each — so returning to a file puts you back where you left off. Markdown files default to Preview; every other file type defaults to Editor. This memory is capped at 50 files and lasts for the current session only — it’s cleared on restart. See Session Persistence for what does and doesn’t survive a restart.
For Markdown- and HTML-specific preview behavior — local images, cross-file links, Mermaid diagrams, live HTML rendering, and exporting — see Preview & Export.