ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Diff​View

by CJTozer ST3

Side-by-Side Git, SVN and Bazaar Diff Viewer for Sublime Text 3

Details

Installs

  • Total 32K
  • Win 14K
  • Mac 11K
  • Linux 6K
Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15
Windows 0 2 0 0 2 5 3 1 4 0 1 1 2 4 5 1 0 1 2 2 1 4 4 4 1 0 4 2 1 1 0 1 0 2 2 2 2 2 0 1 2 7 0 0 1 0
Mac 1 3 0 0 2 4 1 2 4 1 0 0 1 0 3 2 0 3 4 6 3 0 0 2 3 2 3 1 3 1 0 0 4 4 2 10 6 0 1 0 5 3 1 2 2 0
Linux 0 0 0 0 0 0 0 1 1 0 0 0 0 2 2 1 0 1 0 0 0 1 0 0 0 1 1 3 0 0 1 2 0 0 2 0 1 0 1 0 0 1 0 1 1 1
0510Apr 1Mar 29Mar 26Mar 23Mar 20Mar 17Mar 14Mar 11Mar 8Mar 5Mar 2Feb 27Feb 24Feb 21Feb 18Feb 15Apr 1 Linux: 0 Mac: 1 Windows: 0Mar 31 Linux: 0 Mac: 3 Windows: 2Mar 30 Linux: 0 Mac: 0 Windows: 0Mar 29 Linux: 0 Mac: 0 Windows: 0Mar 28 Linux: 0 Mac: 2 Windows: 2Mar 27 Linux: 0 Mac: 4 Windows: 5Mar 26 Linux: 0 Mac: 1 Windows: 3Mar 25 Linux: 1 Mac: 2 Windows: 1Mar 24 Linux: 1 Mac: 4 Windows: 4Mar 23 Linux: 0 Mac: 1 Windows: 0Mar 22 Linux: 0 Mac: 0 Windows: 1Mar 21 Linux: 0 Mac: 0 Windows: 1Mar 20 Linux: 0 Mac: 1 Windows: 2Mar 19 Linux: 2 Mac: 0 Windows: 4Mar 18 Linux: 2 Mac: 3 Windows: 5Mar 17 Linux: 1 Mac: 2 Windows: 1Mar 16 Linux: 0 Mac: 0 Windows: 0Mar 15 Linux: 1 Mac: 3 Windows: 1Mar 14 Linux: 0 Mac: 4 Windows: 2Mar 13 Linux: 0 Mac: 6 Windows: 2Mar 12 Linux: 0 Mac: 3 Windows: 1Mar 11 Linux: 1 Mac: 0 Windows: 4Mar 10 Linux: 0 Mac: 0 Windows: 4Mar 9 Linux: 0 Mac: 2 Windows: 4Mar 8 Linux: 0 Mac: 3 Windows: 1Mar 7 Linux: 1 Mac: 2 Windows: 0Mar 6 Linux: 1 Mac: 3 Windows: 4Mar 5 Linux: 3 Mac: 1 Windows: 2Mar 4 Linux: 0 Mac: 3 Windows: 1Mar 3 Linux: 0 Mac: 1 Windows: 1Mar 2 Linux: 1 Mac: 0 Windows: 0Mar 1 Linux: 2 Mac: 0 Windows: 1Feb 28 Linux: 0 Mac: 4 Windows: 0Feb 27 Linux: 0 Mac: 4 Windows: 2Feb 26 Linux: 2 Mac: 2 Windows: 2Feb 25 Linux: 0 Mac: 10 Windows: 2Feb 24 Linux: 1 Mac: 6 Windows: 2Feb 23 Linux: 0 Mac: 0 Windows: 2Feb 22 Linux: 1 Mac: 1 Windows: 0Feb 21 Linux: 0 Mac: 0 Windows: 1Feb 20 Linux: 0 Mac: 5 Windows: 2Feb 19 Linux: 1 Mac: 3 Windows: 7Feb 18 Linux: 0 Mac: 1 Windows: 0Feb 17 Linux: 1 Mac: 2 Windows: 0Feb 16 Linux: 1 Mac: 2 Windows: 1Feb 15 Linux: 1 Mac: 0 Windows: 0Apr 1 Linux: 0 Mac: 1 Windows: 0Mar 31 Linux: 0 Mac: 3 Windows: 2Mar 30 Linux: 0 Mac: 0 Windows: 0Mar 29 Linux: 0 Mac: 0 Windows: 0Mar 28 Linux: 0 Mac: 2 Windows: 2Mar 27 Linux: 0 Mac: 4 Windows: 5Mar 26 Linux: 0 Mac: 1 Windows: 3Mar 25 Linux: 1 Mac: 2 Windows: 1Mar 24 Linux: 1 Mac: 4 Windows: 4Mar 23 Linux: 0 Mac: 1 Windows: 0Mar 22 Linux: 0 Mac: 0 Windows: 1Mar 21 Linux: 0 Mac: 0 Windows: 1Mar 20 Linux: 0 Mac: 1 Windows: 2Mar 19 Linux: 2 Mac: 0 Windows: 4Mar 18 Linux: 2 Mac: 3 Windows: 5Mar 17 Linux: 1 Mac: 2 Windows: 1Mar 16 Linux: 0 Mac: 0 Windows: 0Mar 15 Linux: 1 Mac: 3 Windows: 1Mar 14 Linux: 0 Mac: 4 Windows: 2Mar 13 Linux: 0 Mac: 6 Windows: 2Mar 12 Linux: 0 Mac: 3 Windows: 1Mar 11 Linux: 1 Mac: 0 Windows: 4Mar 10 Linux: 0 Mac: 0 Windows: 4Mar 9 Linux: 0 Mac: 2 Windows: 4Mar 8 Linux: 0 Mac: 3 Windows: 1Mar 7 Linux: 1 Mac: 2 Windows: 0Mar 6 Linux: 1 Mac: 3 Windows: 4Mar 5 Linux: 3 Mac: 1 Windows: 2Mar 4 Linux: 0 Mac: 3 Windows: 1Mar 3 Linux: 0 Mac: 1 Windows: 1Mar 2 Linux: 1 Mac: 0 Windows: 0Mar 1 Linux: 2 Mac: 0 Windows: 1Feb 28 Linux: 0 Mac: 4 Windows: 0Feb 27 Linux: 0 Mac: 4 Windows: 2Feb 26 Linux: 2 Mac: 2 Windows: 2Feb 25 Linux: 0 Mac: 10 Windows: 2Feb 24 Linux: 1 Mac: 6 Windows: 2Feb 23 Linux: 0 Mac: 0 Windows: 2Feb 22 Linux: 1 Mac: 1 Windows: 0Feb 21 Linux: 0 Mac: 0 Windows: 1Feb 20 Linux: 0 Mac: 5 Windows: 2Feb 19 Linux: 1 Mac: 3 Windows: 7Feb 18 Linux: 0 Mac: 1 Windows: 0Feb 17 Linux: 1 Mac: 2 Windows: 0Feb 16 Linux: 1 Mac: 2 Windows: 1Feb 15 Linux: 1 Mac: 0 Windows: 0Apr 1 Linux: 0 Mac: 1 Windows: 0Mar 31 Linux: 0 Mac: 3 Windows: 2Mar 30 Linux: 0 Mac: 0 Windows: 0Mar 29 Linux: 0 Mac: 0 Windows: 0Mar 28 Linux: 0 Mac: 2 Windows: 2Mar 27 Linux: 0 Mac: 4 Windows: 5Mar 26 Linux: 0 Mac: 1 Windows: 3Mar 25 Linux: 1 Mac: 2 Windows: 1Mar 24 Linux: 1 Mac: 4 Windows: 4Mar 23 Linux: 0 Mac: 1 Windows: 0Mar 22 Linux: 0 Mac: 0 Windows: 1Mar 21 Linux: 0 Mac: 0 Windows: 1Mar 20 Linux: 0 Mac: 1 Windows: 2Mar 19 Linux: 2 Mac: 0 Windows: 4Mar 18 Linux: 2 Mac: 3 Windows: 5Mar 17 Linux: 1 Mac: 2 Windows: 1Mar 16 Linux: 0 Mac: 0 Windows: 0Mar 15 Linux: 1 Mac: 3 Windows: 1Mar 14 Linux: 0 Mac: 4 Windows: 2Mar 13 Linux: 0 Mac: 6 Windows: 2Mar 12 Linux: 0 Mac: 3 Windows: 1Mar 11 Linux: 1 Mac: 0 Windows: 4Mar 10 Linux: 0 Mac: 0 Windows: 4Mar 9 Linux: 0 Mac: 2 Windows: 4Mar 8 Linux: 0 Mac: 3 Windows: 1Mar 7 Linux: 1 Mac: 2 Windows: 0Mar 6 Linux: 1 Mac: 3 Windows: 4Mar 5 Linux: 3 Mac: 1 Windows: 2Mar 4 Linux: 0 Mac: 3 Windows: 1Mar 3 Linux: 0 Mac: 1 Windows: 1Mar 2 Linux: 1 Mac: 0 Windows: 0Mar 1 Linux: 2 Mac: 0 Windows: 1Feb 28 Linux: 0 Mac: 4 Windows: 0Feb 27 Linux: 0 Mac: 4 Windows: 2Feb 26 Linux: 2 Mac: 2 Windows: 2Feb 25 Linux: 0 Mac: 10 Windows: 2Feb 24 Linux: 1 Mac: 6 Windows: 2Feb 23 Linux: 0 Mac: 0 Windows: 2Feb 22 Linux: 1 Mac: 1 Windows: 0Feb 21 Linux: 0 Mac: 0 Windows: 1Feb 20 Linux: 0 Mac: 5 Windows: 2Feb 19 Linux: 1 Mac: 3 Windows: 7Feb 18 Linux: 0 Mac: 1 Windows: 0Feb 17 Linux: 1 Mac: 2 Windows: 0Feb 16 Linux: 1 Mac: 2 Windows: 1Feb 15 Linux: 1 Mac: 0 Windows: 0

Readme

Source
raw.​githubusercontent.​com

DiffView for Sublime Text 3

Git, SVN and Bazaar Diff Viewer for Sublime Text 3

Release Installs The MIT License Gitter

Features

  • 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 Git, SVN and Bazaar (see below for the full set of options)
  • The most common diff (uncommitted changes) is the quickest to use

Screenshots

With 'Persistent List' view style (default)

Screenshot

With 'Quick Panel' view style

Screenshot

Installation

  1. Install the Sublime Text Package Control plugin if you don't have it already
  2. Open the command palette and start typing Package Control: Install Package
  3. Enter DiffView

Usage

  • 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
  • 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

Supported Diff Options

Git

  • Default (when there's no input): comparison of wc against HEAD - i.e. show unstaged changes
  • HEAD or branch or SHA or tag
    • compare working copy against HEAD/branch/SHA/tag
  • branch..
    • compare branch with wc
  • ..branch
    • compare working copy with branch
  • branch_a..branch_b
    • compare branch_a with branch_b
  • branch...
    • compare the merge-base of the working copy and branch with the working copy
  • branch_a...branch_b
    • compare the merge-base of branch_a and branch_b with branch_b

SVN

  • 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

Bazaar

  • Default (when there's no input): show the difference in the working tree versus the last commit
  • -r1
    • Show changes between the working tree and revision 1
  • -r1..3
    • Show changes between revision 1 and revision 3
  • -r1..3 xxx
    • Show changes between revision 1 and revision 3 for branch xxx
  • -c2
    • Show the changes introduced by revision 2 (equivalent to -r1..2)
  • -r-2..
    • Show the changes between the current revision and the previous revision (equivalent to -c-1 and -r-2..-1)
  • FILE
    • Show just the differences for FILE
  • xxx/FILE
    • Show the differences in working tree xxx for FILE
  • --old xxx
    • Show the differences from branch xxx to this working tree
  • --old xxx --new yyy FILE
    • Show the differences between two branches for FILE

Configuration Options

Diff View Style

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"
}

Highlighting Styles

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.

Collapsing Changes List

When working with the “Persistent List” view, to save space there's a configuration option to collapse the list of changes for each file. Toggle the details for the file using Tab (by default).

To configure:

{
    // Whether to collapse each file's list of changes in the "persistent_list" view.
    "collapse_diff_list": true,

}

Invoking From Another Plugin

window.run_command(
    "diff_view",
    {
        "diff_args": "origin/your-base...origin/your-branch",
        "cwd": "/your/cwd",
    },
)

Contributors

Thanks to the following for their contributions:

  • @3v1n0 for adding Bazaar support
  • @leeahoward for raising and providing the fix for #48
  • @rkoval for adding an entrypoint for other plugins to use programmatically #65

Feedback

If you have any issues, comments, or feature suggestions, please raise them on GitHub. All feedback gratefully received.