This package provides:
This package consumes:
Made for Pulsar!
This package was written specifically for Pulsar and did not exist in the Atom package repository.
A split pane diff tool for Pulsar. Diffs text between two split panes, with support for soft-wrap, scroll synchronization, and git changes.
To install diff-view search for diff-view in the Install pane of the Pulsar settings or run ppm install diff-view. Alternatively, you can run ppm install asiloisad/pulsar-diff-view to install a package directly from the GitHub repository.
Packages can consume the diff-view service to programmatically control diffs.
// In your package.json:
"consumedServices": {
"diff-view": {
"versions": {
"1.0.0": "consumeDiffView"
}
}
}
// In your package:
consumeDiffView(diffViewService) {
// Get marker layers for the current diff
diffViewService.getMarkerLayers().then((layers) => {
// layers.editor1MarkerLayer, layers.editor2MarkerLayer
});
// Start a diff between two editors
diffViewService.diffEditors(editor1, editor2, {
ignoreWhitespace: true,
autoDiff: false
});
// Disable the current diff
diffViewService.disable();
}
/**
* 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 diff-view 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 diff-view.
*/
disable();
Got ideas to make this package better, found a bug, or want to help add new features? Just drop your thoughts on GitHub — any feedback’s welcome!
Fork of split-diff.