Origin: Conversion of Textmate diff
bundle
See CHANGELOG.md for details.
Home Page: https://atom.io/packages/language-diff
Origin: Conversion of Textmate diff
bundle
See CHANGELOG.md for details.
I thought it would be great to hilight the whole diffed lines, so I ended using the following stylesheet:
atom-text-editor::shadow {
.line {
position: relative;
.meta.diff.header::after, .meta.diff.index::after,
.markup.inserted.diff::after, .markup.deleted.diff::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
z-index: -100;
content: '';
}
.meta.diff.header::after, .meta.diff.index::after {
background-color: #113050;
}
.markup.inserted.diff::after {
background-color: #224422;
}
.markup.deleted.diff::after {
background-color: #442222;
}
.markup.inserted.diff {
color: #ccffcc;
}
.markup.deleted.diff {
color: #ddaaaa;
}
}
}
It renders well with my theme (solarized-dark), but colors might need to be changed to use theme colors.
Here is a preview:
I got the CSS from here : https://discuss.atom.io/t/highlight-entire-line-depending-on-syntax/20653
If you do a recursive diff to compare two directories, the output includes lines like:
Only in DIR_NAME: FILENAME
It would be great if the syntax could be modified to emphasize these lines in some way. Without emphasis, it's easy to overlook them, because the colored lines stand out much more. Perhaps bolding them would work well?
There is some bad interaction with the GitHub's official light syntax theme, making diff output unreadable. Using Atom as git commit editor. Changing themes to Atom default ones, all works OK.
Opened another issue at the theme's tracking repo: primer/github-syntax-theme-generator#30.
Please advise. Thanks!
[email protected]
[email protected]
[email protected]
[email protected]
In language-diff\styles\diff.less
:
Starting from Atom v1.13.0, the contents of atom-text-editor
elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host
and ::shadow
pseudo-selectors, and prepend all your syntax selectors with syntax--
. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:
atom-text-editor::shadow .diff.inserted
=> atom-text-editor.editor .syntax--diff.syntax--inserted
atom-text-editor::shadow .diff.changed
=> atom-text-editor.editor .syntax--diff.syntax--changed
atom-text-editor::shadow .diff.deleted
=> atom-text-editor.editor .syntax--diff.syntax--deleted
atom-text-editor::shadow .diff.only-in
=> atom-text-editor.editor .syntax--diff.syntax--only-in
Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.
Hi! Thanks for maintaining the language-diff package!
In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save
asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise
that resolves when the save is complete. Because of this, a few other Atom APIs that use save
have similarly become async:
Pane.close
TextBuffer.save
TextEditor.save
Pane.saveItem
Pane.saveItemAs
Pane.saveActiveItem
Pane.saveActiveItemAs
Pane.saveItems
Workspace.saveActivePaneItem
Workspace.saveActivePaneItemAs
We think this package could be impacted by this upgrade because it calls the changed methods in the following places:
TextEditor.save
We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.
It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:
Please let me know if you have any questions. I would be happy to help!
If you view a diff produced using git diff --word-diff=plain
, it doesn't get highlighted.
In language-diff/styles/diff.less
:
Starting from Atom v1.13.0, the contents of atom-text-editor
elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host
and ::shadow
pseudo-selectors, and prepend all your syntax selectors with syntax--
. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:
atom-text-editor::shadow .diff.inserted
=> atom-text-editor.editor .syntax--diff.syntax--inserted
atom-text-editor::shadow .diff.changed
=> atom-text-editor.editor .syntax--diff.syntax--changed
atom-text-editor::shadow .diff.deleted
=> atom-text-editor.editor .syntax--diff.syntax--deleted
atom-text-editor::shadow .diff.only-in
=> atom-text-editor.editor .syntax--diff.syntax--only-in
Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.