Update 'diff' buffers
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Update 'diff' buffers.
Diff state
- Highlight
stale after line-2 edit
Command entered · ready to apply
Diff state
- Highlight
stale after line-2 edit
Command line
- Typed text
:diffupdate- Insertion offset
11
:diffupdate recomputes the diff regions for the two diff windows; buffer contents are unchanged.
Recomputed diff
- Line 2
old ↔ new (DiffChange / DiffText)- Lines 1,3
equal
Before & after
Before
Diff state
- Highlight
stale after line-2 edit
After
Recomputed diff
- Line 2
old ↔ new (DiffChange / DiffText)- Lines 1,3
equal
Documentation-backed illustration. +diff; both displayed windows are diff-enabled in the same tab; diffopt=filler,closeoff,inline:char excludes internal, diffexpr is empty and a compatible external diff program works; the completed last comparison had both buffers equal, then only right.txt line 2 changed from old to new without adding or deleting lines, leaving the cached comparison stale; no DiffUpdated autocommands alter the shown state. :diffupdate recomputes the diff regions for the two diff windows; buffer contents are unchanged. Primary help: :diffupdate.
one
new
threeCursor on line 1, column 1Details & Vim help
Update 'diff' buffers. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :dif[fupdate] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.