NORMAL ~/wkd/p/diff :set skin=modern utf-8

diff.nvim

Flexible diffing for Neovim: one :Diff command compares arbitrary sources — buffers, files, git revisions, URLs, whole directories — against each other and delivers the result however you like: split, inline, prompt, file, clipboard, or a one-line stat summary.

status
beta — Beta stage — active development. This repository is past its first shape and in active use, but the surface is not frozen: breaking changes are still possible. Pin a commit or tag if you depend on it.
category
Debug & inspect
neovim
0.9+
repo
github.com/StefanBartl/diff.nvim
commits
138
help
:help diff

demo

recorded with VHS from demos/diff.tape in a clean Neovim — re-recorded weekly
what is shown when
  1. :Diff target=file - this buffer against a file
  2. ]c and [c - jump between hunks

install

{
  "StefanBartl/diff.nvim",
  opts = {},
}

docs/

git log

  1. fix notify: route keymaps.lua's shortcut warnings through diff.util.notify
  2. feat notify: request popup delivery explicitly in diff.nvim's notifier
  3. docs link back to the wkd family site
  4. feat core.git: resolve() via lib.nvim.git.show_async, not a hand-built vim.system call (GS-14)
  5. ci bump JohnnyMorganz/stylua-action to v5 (Node-20 deprecation)
  6. docs TESTS: align run.lua header examples with the ci.yml -n/-i NONE invocation
  7. test run: restore stubbed globals after every spec
  8. ci publish ci-verified fail-closed and with a lease on the compared tip
  9. ci publish the verified commit as the ci-verified branch
  10. test history: derive the expected root from the buffer name, not realpath; drop the 404 diagnostic
  11. test compare the buffer-name fallback against the resolved root (macOS /private/var)
  12. ci bump the failure-log upload to actions/upload-artifact@v7 (Node 24)

keys

j / k
next / previous line
gg / G
first / last line
⏎
open the line under the cursor
/
search the plugins
:
command line — Tab completes
:help x
vimdoc of a plugin (:e x = plugin page)
:ls · :log · :stack
plugin list · activity stream · dependency graph
:colo x
colorscheme
:set skin=
modern | tui
?
this help
esc
close