Git and SVN Diff Viewer for Sublime Text 3
- Side-by-side view with differences highlighted
- Quick navigation from one change to the next, or search for diffs in a specific file
- Auto-detects the repository to use from the current active file
- Flexible diffs for both Git and SVN (see below for the full set of options)
- The most common diff (uncommitted changes) is the quickest to use
- Install the Sublime Text Package Control plugin if you don't have it already
- Open the command palette and start typing
Package Control: Install Package
- Enter
DiffView
- See options under "DiffView" in the Command Palette, and also the following keyboard shortcuts
Alt + Shift + D
to run a diff- Enter the diff to run, and hit enter
- See below for supported diff options
- This lists all the changes, and shows you a preview as you move down the list
- You can search for a particular file in the list of changes, which will filter the results
- Hit
Enter
to jump to the currently selected change - hit
Esc
to cancel the DiffView, and return to where you were
- Enter the diff to run, and hit enter
Alt + D
to review the last diff- This will show the list of changes from the last diff, starting from the last change you previewed
- Default (when there's no input): comparison of wc against
HEAD
- i.e. show unstaged changes HEAD
orbranch
orSHA
ortag
- compare working copy against
HEAD
/branch
/SHA
/tag
- compare working copy against
branch..
- compare
branch
with wc
- compare
..branch
- compare working copy with
branch
- compare working copy with
branch_a..branch_b
- compare
branch_a
withbranch_b
- compare
branch...
- compare the merge-base of the working copy and
branch
with the working copy
- compare the merge-base of the working copy and
branch_a...branch_b
- compare the merge-base of
branch_a
andbranch_b
withbranch_b
- compare the merge-base of
- Default (when there's no input): show uncommitted changes
-r 123
- compare revision 123 with the latest revision (not the working copy)
-r 123:234
- compare revision 123 with revision 234
-c 234
- show changes made in commit 234
--cl issue1234
- show uncommitted changes on changelist
issue1234
- show uncommitted changes on changelist
There are 2 different view styles supported - "Quick Panel" and "Persistent List". You can see them in action in the screenshots above. Try them both and pick a favourite!
{
// The style for viewing the diff. Options are:
// - "quick_panel"
// - "persistent_list"
"view_style": "persistent_list"
}
Each of the highlihgted regions' styles can be configured in the settings. These settings are all documented in the 'Default' settings (Preferences -> Package Settings -> DiffVew -> Settings - Default
). Copy the settings to your User settings (Preferences -> Package Settings -> DiffVew -> Settings - User
) to override the defaults.
This plugin is still in active development. If you have any issues, comments, or feature suggestions, please raise them on GitHub. All feedback gratefully received.