-
-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Title: Feature Request: Word-Level Inline Diff View (Like difflib.ndiff
)
Summary:
The Partial Diff extension is already fantastic for comparing two code selections. But right now, it shows line-level differences only — meaning even small changes highlight entire lines red or green.
To improve precision and readability, especially when reviewing GPT-generated code changes, we’d love to see inline word-level diffs added as an option.
✨ Proposed Enhancement:
Use something like Python's difflib.ndiff()
or SequenceMatcher
to detect word/token-level changes, and highlight just the changed part of the line.
🚫 Current Behavior (Line-Level Only):
Current view: both lines are marked fully changed.
Ideal view: just , samples=128
is highlighted.
💡 Implementation Suggestion:
Use a word tokenizer (e.g., split on whitespace + symbols), align both sides using difflib.ndiff()
or SequenceMatcher
, and render only inserted/deleted words in green/red.
🔥 Why It Matters:
-
Makes GPT-assisted workflows more usable
-
Great for tutorials, pair programming, and self-reviews
-
Lets you immediately understand changes, not just that something changed
Thanks again — Partial Diff is already great, and this would take it to the next level!