Open the focused file's old/new versions in an external diff tool (e.g. vimdiff)
Problem
vimdiff is my standard diff tool. When reviewing in revdiff I can't open the file I'm looking at in it. I have to quit or leave revdiff and re-run vimdiff by hand with the right revisions, which is tedious.
What exists today
eopens the working-tree file in$EDITOR. It isn't a diff, so there is no old side. It also refuses files with line annotations and doesn't work with--stdin.--keysonly rebinds built-in actions, and--post-flush-commandisn't file-aware, so neither can do this.- I found no existing issue or PR for difftool, vimdiff or external diff.
Proposal
A new action, open_in_difftool (default E), that suspends the TUI, opens the focused file's old and new versions in an external diff tool (default vimdiff, configurable), then reloads. Git only. This is not in-TUI side-by-side (#426): revdiff's rendering and annotation logic are untouched.
I have a working implementation of about 600 lines including tests, and I'm happy to trim it or drop the idea. I won't open a PR unless you approve.
Developed with AI assistance (Claude Code).
I'd rather not add this one. Showing the diff and collecting annotations for the caller is what revdiff does, and handing the file over to another diff viewer is outside that. It would also bring a new key, a tool setting and per-mode rules (refs, --staged, untracked, stdin, hg and jj) to maintain, for something git difftool already does.
if you want vimdiff on a file while revdiff is open, run it from another pane with the same refs as the review:
git difftool -y HEAD~3 -- path/to/file.go # revdiff HEAD~3
git difftool -y --cached -- path/to/file.go # revdiff --staged
with diff.tool = vimdiff in your git config, that opens the same pair revdiff shows.
thx for asking before sending the PR.
Thanks for the prompt reply! Sounds like the scope is kept specific. I forked a personal branch for this capability. Will not send a PR.
Best