Diff Tracker is a VS Code extension that records file changes and shows a Git-like inline diff directly in the editor.
| Editor Inline View | Editor Inline View (hover effect) |
|---|---|
| Inline View 2 | Side-by-side diff |
|---|---|
- Activity Bar view for tracked changes
- Recording mode to start and stop tracking
- Inline diff with added/removed highlights
- Word-level diff highlighting - precisely highlights changed words within modified lines
- Side-by-side diff on demand
- Hover details for deleted/modified content
- Multi-file tracking with timestamps
- Block-wise Revert/Keep buttons (like Cursor)
- File-level "Revert All" / "Keep All" CodeLens
- Revert per file or revert all
- Clear all tracked diffs
- Editor title buttons for inline and side-by-side diff
- Settings panel in sidebar to toggle display options
- Open the Diff Tracker view from the Activity Bar.
- Click Start Recording.
- Edit any file in your workspace.
- Click a file in the left list to open the inline diff.
- Use the editor title buttons to open:
- Inline Diff (single-column)
- Side-by-Side Diff
- Use Revert File or Revert All as needed.
- Click Clear Diffs to remove all tracked changes.
- Click Stop Recording when you are done.
When recording starts, Diff Tracker:
- Captures a baseline snapshot for files
- Watches for content changes
- Builds inline and side-by-side diffs
- Updates the editor and the changes view in real time
- Download the .vsix file
- Open VS Code
- Open Extensions (Cmd+Shift+X)
- Click ... -> Install from VSIX...
- Select the downloaded .vsix
- Clone the repository
- Run npm install
- Run npm run compile
- Press F5 to launch the Extension Development Host
- VS Code ^1.80.0
This extension provides the following settings (toggle via the sidebar Settings panel):
| Setting | Default | Description |
|---|---|---|
diffTracker.showDeletedLinesBadge |
true |
Show a badge indicating deleted lines |
diffTracker.showCodeLens |
true |
Show CodeLens actions (Revert/Keep) above change blocks |
diffTracker.highlightAddedLines |
true |
Highlight added lines with green background |
diffTracker.highlightModifiedLines |
true |
Highlight modified lines with blue background |
diffTracker.highlightWordChanges |
true |
Highlight word-level changes within modified lines |
None at this time. Please open an issue if you find a bug.
- Activity Bar entry
- Recording mode for change tracking
- Inline diff highlighting
- Side-by-side diff
- Multi-file tracking with timestamps
- Revert file and revert all
- Clear diffs
- Change from LCS-based diff to Patience Diff algorithm for more intuitive diff display
- Add Partial Revert/Keep buttons, just like cursor
- Add go-to-original-file button in left panel
- Add file-level "Revert All" / "Keep All" buttons (CodeLens at file top)
- Add settings panel in sidebar to toggle display options
- Fix block-wise keep/revert affecting all blocks instead of just one
- Fix hover showing "unknown" for deleted empty lines
- Tiny bug fix
- Add word-level diff highlighting for modified lines
- Add "Highlight Word Changes" setting to toggle word-level highlighting
MIT