delta — Syntax-Highlighting Pager for Git Diff and Grep
delta is a syntax-highlighting pager for git, diff, grep, and rg output. Beautiful side-by-side diffs with language-aware highlighting, line numbers, and theming. Drop-in replacement for the default git pager.
Ready-to-run agent install
This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.
npx -y tokrepo@latest install 224cd8c0-35d4-11f1-9bc6-00163e2b0d79 --target codexRun after dry-run confirms the install plan.
What it is
delta is a syntax-highlighting pager for git, diff, grep, and ripgrep output. It provides side-by-side diffs with language-aware highlighting, line numbers, and customizable themes. It is a drop-in replacement for the default git pager.
delta targets developers who review diffs frequently and want a more readable experience than plain text. It understands language syntax, so changes in Python look different from changes in YAML, and inline changes within a line are highlighted precisely.
The project is actively maintained and suitable for both individual developers and teams looking to integrate it into their existing toolchain. Documentation and community support are available for onboarding.
How it saves time or tokens
delta makes code review faster by highlighting exactly what changed within each line, not just which lines changed. Side-by-side mode shows old and new code simultaneously. Language-aware highlighting means you can quickly parse the syntax of changed code without opening it in an editor.
How to use
- Install delta via Homebrew (
brew install git-delta), apt, or download from GitHub releases. - Configure git to use delta as the pager by adding settings to
~/.gitconfig. - Run
git diff,git log -p, orgit showas usual. delta activates automatically. - Customize themes and display options in your gitconfig.
Example
# ~/.gitconfig
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
side-by-side = true
line-numbers = true
syntax-theme = Dracula
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
# After configuration, just use git normally
git diff
git log -p --follow src/main.rs
git show HEAD~3
Related on TokRepo
- AI Tools for Coding — Developer tools and coding productivity utilities.
- Featured Workflows — Browse curated CLI tools and developer workflows.
Common pitfalls
- Forgetting to install a compatible terminal. delta uses 24-bit color. Terminals that do not support true color show garbled output. Use iTerm2, Alacritty, Kitty, or Windows Terminal.
- Not setting
navigate = true. Without it, you cannot use n/N to jump between diff sections, losing one of delta's best navigation features. - Using delta with a light terminal theme but a dark syntax theme (or vice versa). Match your delta syntax-theme to your terminal background for readability.
- Not reading the changelog before upgrading. Breaking changes between versions can cause unexpected failures in production. Pin your version and review release notes.
Frequently Asked Questions
No. delta processes output after git generates it. The rendering overhead is negligible for typical diffs. For extremely large diffs (thousands of files), you may notice a slight delay.
Yes. delta works as a pager for diff, grep, and ripgrep output. Pipe any diff-formatted output to delta for syntax highlighting: `diff file1 file2 | delta`.
delta supports all themes from the bat project, which includes Dracula, Monokai, Solarized, Nord, and dozens more. Run `delta --list-syntax-themes` to see all options and preview them.
Yes. Set `side-by-side = true` in your gitconfig's [delta] section. This shows old and new code in adjacent columns, which is especially useful on wide terminals.
delta is designed for interactive terminal use. In CI pipelines, standard diff output is more appropriate since there is no terminal to render colors and formatting.
Citations (3)
- delta GitHub— Syntax-highlighting pager for git and diff output
- delta README— Drop-in replacement for git's default pager
- bat GitHub— Bat syntax themes for terminal highlighting
Related on TokRepo
Discussion
Related Assets
bat — A cat Clone with Wings and Syntax Highlighting
bat is a cat clone with wings — syntax highlighting, Git integration, automatic paging, and line numbers. A drop-in replacement for cat that shows code and configs beautifully in your terminal. Written in Rust.
Difftastic — Structural Diff Tool That Understands Syntax
A structural diff tool that compares files based on their syntax tree rather than line-by-line text, producing diffs that reflect actual code changes instead of incidental whitespace or formatting shifts.
Highlight.js — Automatic Syntax Highlighting for the Web
Highlight.js is a syntax highlighter written in JavaScript that works in the browser and on the server, with automatic language detection and support for nearly 200 languages.
Shiki — Syntax Highlighter Powered by TextMate Grammars
Shiki is a syntax highlighter that uses the same grammar engine as VS Code, producing accurate and beautiful code highlighting for documentation, blogs, and any web content.