Make current window a diff window
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Make current window a diff window.
Windows
- Window 1 · alpha.txt Active
80 columns × 23 lines
Option · diff
- Local diff
0- Global diff
0
Command entered · ready to apply
Windows
- Window 1 · alpha.txt Active
80 columns × 23 lines
Option · diff
- Local diff
0- Global diff
0
Make current window a diff window
Windows
- Window 1 · alpha.txt Active
80 columns × 23 lines · diff
Option · diff
- Local diff
1- Global diff
0
Before & after
Before
Windows
- Window 1 · alpha.txt Active
80 columns × 23 lines
Option · diff
- Local diff
0- Global diff
0
After
Windows
- Window 1 · alpha.txt Active
80 columns × 23 lines · diff
Option · diff
- Local diff
1- Global diff
0
Start in Normal mode. Only alpha.txt is displayed. This example enables diff options for that window. A comparison needs a second buffer in diff mode, so this sequence does not invoke the configured /usr/bin/diff helper.
same first
old value
same lastCursor on line 3, column 1Details & Vim help
Example replayed in Vim
Make current window a diff window. 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 :difft[his] 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.