Atom Packages Directory

a package directory for a text editor of the 21st Century

Split Diff

Install with:
    apm install split-diff
  

split-diff package

Diffs text between two split panes. New panes are created if less than two panes exist upon run of the package.

** Supports diffing recent git changes! **

Split Diff in action

Usage

Commands

You can call any of these commands from your own custom keybinding, simply override the command in your keymap.cson!

Command Effect Default Keymaps
Toggle split-diff:toggle Toggles a diff of the text between two side-by-side panes. Creates panes as necessary. Displays git changes if there is a repository found. ctrl-alt-t
Enable split-diff:enable Enables a diff of the text between two side-by-side panes. Creates panes as necessary. Displays git changes if there is a repository found.
Disable split-diff:disable Disables a diff. Removes any panes that were created by this package.
Ignore Whitespace split-diff:ignore-whitespace Toggles the Ignore Whitespace setting.
Move to Next Diff split-diff:next-diff Highlights the next difference. Moves the cursor so it can be easily copied. ctrl-alt-n
Move to Previous Diff split-diff:prev-diff Highlights the previous difference. Moves the cursor so it can be easily copied. ctrl-alt-p
Copy to Right split-diff:copy-to-right Copies all differences containing a cursor to the right pane. ctrl-alt-.
Copy to Left split-diff:copy-to-left Copies all differences containing a cursor to the left pane. ctrl-alt-,

Settings

Customization

The highlighting for this package uses global UI variables defined in your syntax theme. The variables are @syntax-color-added, @syntax-color-removed, @syntax-color-modified, and @syntax-gutter-background-color-selected (for the blank spacers between lines). Make sure your theme defines these, so it is compatible with this package!

To override these colors in your styles.less, write selectors for .split-diff-added, .split-diff-removed, .split-diff-selected, and/or .split-diff-offset. For instance:

.split-diff-added { background-color: fade(blue, 40%) !important; }

Minimap Plugin

Get the Split Diff minimap plugin to make it easier to spot differences!

Keywords: diff, git, split, compare, panes, files, lines, code, difference, visual Suggest keywords
Fork me on GitHub