Releases: smarzban/herdr-file-viewer
Release list
v1.11.0
Mouse-driven text selection in the content pane, plus content copy in line-select mode.
Added
- Ambient mouse text selection. Click-drag anywhere in the content pane during normal navigation to select text character-by-character; release to copy ("Copied selection"). Works in wrapped views, and
Shift+drag still gives the terminal's native selection. Thanks @j-pollack! - Mouse text selection in line-select mode, character-by-character with a live highlight as you drag.
y/Yin line-select mode copy the selected content (byte-faithful, no line-number gutter, indentation preserved), whileEnterkeeps copying thepath:line/path:start-endreference.
Changed
- In line-select mode, a mouse press now places the selection caret (previously a click placed the line marker and a double-click copied); copying is now always an explicit
Enter/y.
Fixed
- Open-in-tab (
prefix+shift+f) no longer jumps to a viewer in another workspace (#83). Invoking the tab action from a different workspace now opens a fresh viewer in the current workspace instead of switching you to the other workspace's tab. Within-workspace open-or-switch-or-toggle is unchanged. - Left gap in the rendered-markdown and diff views (#82). These views now sit one column in from the content pane's left border, matching the gap syntax-highlighted files already get from their line-number gutter.
Full changelog: v1.10.0...v1.11.0
v1.10.0
Added
-
Reveal in file manager / open with default app. Two new read-only, non-blocking keyboard hand-offs on the selected tree entry:
O— open the selected file or directory with the OS default applicationR— reveal the selected entry in the OS file manager (highlighted)
Each hands off to the host OS (macOS
open/open -R, Linuxxdg-open, Windowsexplorer/explorer /select,) and never blocks the viewer. Requested in #68.
Install / update: herdr plugin install smarzban/herdr-file-viewer
v1.9.0
Added
Copy a line reference — L line-select mode
With the content pane focused (or zoomed), press L to enter line-select mode:
- A marker appears on the top visible source line.
j/k(or↑/↓) move it; hold Shift (J/K, or Shift+↑/↓) to extend a selection. Enter— or a double-click — copies the repo-relative reference to the clipboard over OSC 52, the same path asy/Y:- a single line →
src/app.rs:42 - a range →
src/app.rs:42-58
- a single line →
- A mouse click places the marker; a double-click copies.
Escexits. - Entering from a rendered-markdown or diff view first switches that file to the line-numbered source view, since line numbers only map there.
Lstays focus-gated: with the tree focused it still performs the tree's horizontal scroll (unchanged).- Correct under the
wwrap toggle — the marker, mouse click, and copied reference map through the wrapped layout, so they land on the right source line.
Read-only, zero new dependencies.
Also in this release: internal test hardening so the full CI matrix (including windows-latest) is green — two hostile-filename tests that can't run on Windows are now unix-gated, with no loss of sanitizer coverage.
v1.8.0
Native Windows support (preview)
The viewer now builds and runs natively on Windows (x86_64-pc-windows-msvc), alongside Linux and macOS.
Install (herdr preview channel):
herdr plugin install smarzban/herdr-file-viewer --ref v1.8.0
Summon it:
herdr plugin action invoke open-file-viewer-windows --plugin herdr-file-viewer
Prereqs: Git for Windows on PATH; optionally glow/bat/delta (winget) for rendered output — without them files show as plain text.
Windows is preview — best-effort, no Windows-on-ARM and no code-signing. Keybindings via [[keys.command]] are blocked by a herdr-side limitation (ogulcancelik/herdr#1041); use action invoke for now.
Thanks to @anirudhsk-official / @sanirudh17 for validating on real hardware (#58).
v1.8.0-preview.3
Preview build for Windows testing — not a stable release. Isolated from stable users: herdr plugin install (no --ref) still serves v1.7.0, and the in-app update check ignores pre-release tags.
v1.8.0-preview.3 — reworks the Windows launcher based on live real-hardware testing (thanks @anirudhsk-official 🙏). The viewer itself was proven to render correctly on Windows; the earlier previews just couldn't launch it automatically.
What changed since preview.2 (GH #58)
The real root cause: herdr on Windows can't spawn a plugin's relative command — it passes the relative program name to CreateProcessW, which resolves it against herdr's own directory (not any --cwd), so it always failed ERROR_PATH_NOT_FOUND. So the Windows launcher now spawns the viewer by absolute path (pane split / tab create + pane run), rooted at your focused pane's directory, and the actions locate their launcher script by asking herdr for its own plugin folder. Proven working end-to-end on real hardware.
Prerequisites (Windows)
- herdr on its preview channel (Windows binaries ship only there).
- Git for Windows on PATH — herdr uses it to install the plugin, and the viewer uses it for the tree's git status + diffs.
- Windows Terminal.
- Optional renderers for pretty output (without them, files show as plain text — that's the intended fallback, not a bug):
Install these before starting herdr (or restart herdr afterward) so it picks them up on PATH.
winget install charmbracelet.glow winget install sharkdp.bat winget install dandavison.delta
Install
herdr plugin install smarzban/herdr-file-viewer --ref v1.8.0-preview.3
Pulls a SHA-256-verified prebuilt .exe — no Rust toolchain needed.
Try it
Bind a key (in ~/.config/herdr/config.toml), or invoke the action directly:
herdr plugin action invoke open-file-viewer-windows --plugin herdr-file-viewer
The viewer should open in a split on the right, rooted at your current pane's directory. Press again to focus/close it. Tab variant: open-file-viewer-tab-windows.
Known limitation
The type = "shell" keybinding spawn appears to be a herdr-side issue on Windows (the identical action invoke works when typed) — being tracked upstream. Mouse clicks inside the pane also depend on herdr forwarding mouse events; the viewer is fully keyboard-driven regardless (? shows all keys).
v1.8.0-preview.2
Preview build for Windows testing — not a stable release. Isolated from stable users: herdr plugin install (no --ref) still serves v1.7.0, and the in-app update check ignores pre-release tags.
This is v1.8.0-preview.2, which carries fixes for the launch-layer issues found testing preview.1 on real Windows (thanks @anirudhsk-official 🙏).
Fixed since preview.1 (GH #58)
Root cause: herdr runs plugin commands against a \\?\ extended-length (verbatim) working directory on Windows, which the OS doesn't normalize — so relative command paths (and / / .) failed with ERROR_PATH_NOT_FOUND (os error 3).
- Pane launch — the Windows launcher now opens the viewer with an explicit clean
--cwd <plugin-root>, so herdr resolves the relative command against a normalizable path instead of the\\?\server cwd. .exe— a distinct Windows pane entry (file-viewer-windows) names the.exeexplicitly (herdr does not append it).- Action launch — the Windows actions re-derive the launcher script's absolute path from the cwd (stripping any
\\?\prefix) instead of a relative-File.
Known limitation
The type = "shell" keybinding spawn (os error 3 even when the identical herdr plugin action invoke … works when typed) appears to be a herdr-side issue, independent of this plugin — so please test via herdr plugin action invoke first (see the issue thread).
Install (Windows, herdr preview channel)
herdr plugin install smarzban/herdr-file-viewer --ref v1.8.0-preview.2
Pulls a SHA-256-verified prebuilt .exe — no Rust toolchain needed.
v1.8.0-preview.1
Windows support (preview) — pre-release for real-hardware validation
This is a pre-release cut so the native-Windows build can be validated on real hardware (see #58) before it ships in a stable release. It is not a normal release:
- Stable users are unaffected.
herdr plugin install smarzban/herdr-file-viewerstill installs v1.7.0 (it tracksmain, which is unchanged), and the in-app update check ignores pre-release tags — so no one is nudged toward this build. - Windows is best-effort / preview, mirroring herdr's own Windows posture — not a parity guarantee.
Install this preview (Windows)
Prereqs: herdr on its preview channel (herdr's Windows binaries ship only there), and Windows Terminal.
herdr plugin install smarzban/herdr-file-viewer --ref v1.8.0-preview.1
This downloads the SHA-256-verified prebuilt herdr-file-viewer-x86_64-pc-windows-msvc.exe — no Rust toolchain required. (On Linux/macOS you can install the same ref to try it there too.)
What's included
Native Windows (x86_64-pc-windows-msvc): platform seams (git path decoding, NUL device, %LOCALAPPDATA% cache, quote-aware $EDITOR + absolute-path Notepad default, .exe resolution), a PowerShell install script + launcher scripts, and an advisory windows-latest CI job. Full test suite is green on windows-latest. Zero new dependencies.
On Windows, bind the -windows action ids
herdr requires unique action ids, so the Windows launchers register as open-file-viewer-windows and open-file-viewer-tab-windows (the unqualified ids are the Linux/macOS variants):
command = "herdr plugin action invoke open-file-viewer-windows --plugin herdr-file-viewer"
Please test & report on #58
Open the viewer (split + tab), navigate the tree, view diffs / rendered markdown / highlighted code, try search (/), go-to-file (f), go-to-line (:), the editor hand-off (e), and copy-path (y/Y). Anything that panics, hangs, or renders wrong — please note it on the issue. Your validation is what lets us drop the "preview" label later.
v1.7.0
herdr-file-viewer v1.7.0
The audit-driven Optimisations release: accessibility, UX papercuts, test-suite hardening, and a
large internal refactor — all behavior-compatible with v1.6.0.
Added
- Keyboard tree horizontal scroll —
H/L(Shift+h/l): scroll the tree pane sideways for
long or deeply-nested rows, mirroring the content pane's←/→. Closes the last mouse-only gap
(AC-18, keyboard-first). Lowercaseh/lstill collapse/expand. - A
? helphint on the content pane's bottom border, so the help overlay is discoverable
without guessing. - Empty-state guidance for blank panes (
Directory — select a file to view,No files) instead
of a blank void.
Changed
- Non-color accessibility cues alongside color-only signals (survive a colorblind palette or a
non-default theme): a●glyph on dirty directories, a▶marker on the active help tab, a
(current)label on the current worktree, and aREVERSED|BOLDcurrent-search-match. - Cleaner failure messages: renderer-fallback notices name the missing tool and point to
docs/renderers.mdinstead of leaking a raw OS error; editor hand-off now distinguishes a launch
failure from a non-zero editor exit. - Docs:
gitdocumented as a runtime requirement;docs/renderers.mdcorrected (bundled glow
palette; onlydelta/batare cargo-installable);ARCHITECTURE.mdupdated for the newproc
module and thecontroller/package layout. - Internal: shared
proc::wait_boundedsubprocess reaper;controller.rssplit from one
3,256-line god-module into acontroller/package (core +mouse/help/finder/picker/
infile/git_applysubmodules), with the open overlay collapsed into a singleModalenum so
"at most one modal open" is type-enforced. Behavior-preserving.
Fixed
- No stale content under a new title while an off-thread render is in flight — the pane shows a
Rendering…placeholder and the title + body switch to the new file together.
Test/CI hardening
- Perf-budget stopwatch tests gated behind a
perfcargo feature;search_perf/index_perf
rewritten as relative-scaling asserts that catch O(n²) without flaking on a loaded runner; pty e2e
tests switched to wait-for-content. A real read-only-invariant test routing every intent through
the handler, a modal×intent guard matrix, table-driven git-parser tests, and an OSC-52 ingestion
test.
Full changelog: see CHANGELOG.md.
No breaking changes; same install path.
v1.6.0
A batch of navigation and help features on top of v1.5.0 — read-only as always, no breaking changes.
Added
- Go to file (
f) — a fuzzy finder over every file in the tree: type to filter,↑/↓to move,Enterto open. (#51) - Go to line (
:) — jump the content pane to a line number; in a rendered-markdown or diff view it switches to the line-numbered content view to make the jump. (#54) - Search in file (
/,n/N) — incremental, smartcase, literal match highlighting that works in every view;Entercommits,n/Ncycle through matches and wrap at the ends. (#55) - In-app help overlay (
?) — a view-only overlay with What's New (the changelog, rendered as markdown) and About (version · repo · license · update status). (#56) - The tree names its root and branch — the tree column's top border shows the root directory and its bottom border the current git branch. (#52)
Changed
- Installing reuses the latest released binary even when
mainis ahead of the tag — matched by version rather than exact commit, so landing a PR no longer forces new users to compile while a release is pending. (#50)
Fixed
- The worktree picker's
←responds immediately after over-scrolling right. (#52)
Install / update: herdr plugin install smarzban/herdr-file-viewer — prebuilt binaries (macOS arm64 + x86_64, Linux x86_64) are SHA-256 verified, with a source-build fallback.
v1.5.0
Added
- Scrollbars on the tree and content panes — a vertical bar when there's more than fits, a
horizontal bar when a row or unwrapped line runs wider than the pane. They show only where
there's something to scroll, sit just inside the pane, and are draggable with the mouse
(drag ↕/↔, or click the track to jump). Dragging the tree's vertical bar scrubs the selection. - Horizontal tree scrolling so a long or deeply-nested file name can be read in full — via the
horizontal wheel or by dragging the tree's horizontal scrollbar. - Hide hidden files (
.) — a toggle that drops dot-prefixed files/folders from the tree (handy
in a$HOMEfull of them). Independent of the gitignore toggle (i), off by default. (#46)
Fixed
- The tree now scrolls to follow the selection — on a long list it used to stay pinned to the
top, so moving the cursor past the last visible row selected files you couldn't see. (#45)
Thanks to @julianduque for reporting #45 and #46.