a structural diff that understands syntax
open sourceMITself-hostablefree
difftastic compares files based on their syntax trees rather than lines. It highlights exactly which pieces of syntax changed, ignores pure reformatting and indentation changes where whitespace is insignificant, and works with git and other VCSs. It supports over 30 languages and falls back to line-oriented diffs for unknown files. Output is for humans; it does not produce patches.
Ways to install
Package managers
Problems it solves
- a formatter reflowed my code and git diff shows every line as changed
- diff that ignores indentation changes but shows real code changes
- see which expression changed inside a long line
- reviewing a refactor where code moved across lines is impossible with line diffs
- want a diff that understands the programming language
- wrapping a function call over multiple lines makes the diff unreadable
- compare two JSON or code files structurally
- use a smarter diff tool as git difftool
Features
- syntax-aware diffing
- 30+ languages
- side-by-side display
- git integration
- line-diff fallback
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what difftastic does.
