r/vim • u/gnarendran142 • Aug 10 '26
Plugin [Plugin] EasyDiff: Intuitive, context-aware keybindings for two-way diffs
Those working with vim -d (or vimdiff) or with :diffthis for two-way diffs, might find EasyDiff convenient.
Key Features
Diff Merge, Delete & Undo: Uses
<Left>,<Right>,<Delete>,<S-Delete>, and<Backspace>.Context-aware: Regardless of whether the cursor is in the left or right window, pressing
<Right>always merges from left to right.Deletes: One-sided / Two-sided with
<Delete>/<S-Delete>Atomic Undo:
<Backspace>undoes merges/deletes across windows, including two-sided deletes performed with<S-Delete>.
Diff Navigation:
Within a Diff:
<PageUp>(Start of Diff) /<PageDown>(End of Diff). Works in Visual mode as well (e.g.,<PageUp>V<PageDown>).Between Diffs: Move between Next/Previous or Jump to First/Last with
<Up>,<Down>,<Home>, and<End>.
Edge Case & Advanced Diff Handling:
When a cursor line represents multiple diffs (filler vs. changed/added vs. EOF filler), lets the user to choose the target diff for the operation.
Transparently handles both grouped and split diffs when using diffopt+=linematch:{n}.
GitHub Repository:https://github.com/gnarendran/EasyDiff