split-diff

A split pane diff tool.

mupchrch

980,526

745

1.6.1

MIT

GitHub

This package provides the following services:

split-diff Installs! Version! License

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

Minimap Plugin

Get the split-diff minimap plugin to make it easier to spot differences.

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,
ctrl-alt-d (linux)
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. ...
Set Ignore Whitespace split-diff:set-ignore-whitespace Toggles the Ignore Whitespace setting. ...
Set Auto Diff split-diff:set-auto-diff Toggles the Auto Diff 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

Colors

Service API

Packages can consume the split-diff service to do things like enable a diff between two editors.

/**
 * Getter for the marker layers of each editor being diffed.
 * @return {Promise} A promise that resolves to an object containing the marker layers.
 */
getMarkerLayers();

/**
 * Enables split-diff between the two given editors.
 * @param {TextEditor} editor1 - The left editor.
 * @param {TextEditor} editor2 - The right editor.
 * @param {object} options - Options to override any package setting.
 */
diffEditors(editor1, editor2, options);

/**
 * Disables split-diff.
 */
disable();