What delta Does
- Syntax highlighting — 100+ languages via syntect
- Side-by-side view — optional two-column mode
- Line numbers — in diffs
- File headers — stylized, navigable
- Navigation — jump between files with
n/N - Themes — Sublime Text themes work
- Merge conflicts — 3-way diff highlight
- Whitespace errors — visible
- git blame — also prettified
- Works with — git, diff, rg, blame
Architecture
Rust binary that reads diff/patch format on stdin and writes colorized output to stdout. Integrates with git via core.pager = delta. Syntax highlighting uses the syntect crate (Sublime .sublime-syntax compatible).
Self-Hosting
CLI tool, git pager.
Key Features
- Syntax highlighting for 100+ languages
- Side-by-side diff view
- Line numbers
- File navigation (n/N)
- Sublime theme compatibility
- Works with git diff/show/log/blame
- Integrates with rg, grep
- Dark and light modes
- Configurable via gitconfig
Comparison
| Pager | Highlighting | Side-by-side | Language |
|---|---|---|---|
| delta | Yes | Yes | Rust |
| diff-so-fancy | Yes | No | Perl |
| diff-highlight (git) | Limited | No | Perl |
| bat + diff | Yes | No | Rust |
| less | No | No | C |
FAQ
Q: vs diff-so-fancy? A: Similar functionality. delta is faster (Rust), supports side-by-side, and has richer syntax highlighting. diff-so-fancy is older and simpler.
Q: Side-by-side is hard to read?
A: Adjust max-line-length and terminal width. Overly wide lines wrap automatically; on narrow terminals, turn side-by-side off.
Q: Does it work with git log?
A: Yes. git log -p automatically goes through delta's pager. git blame is also highlighted separately.
Sources
- Docs: https://dandavison.github.io/delta
- GitHub: https://github.com/dandavison/delta
- License: MIT