summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordandavison <>2023-03-10 12:49:29 +0000
committerdandavison <>2023-03-10 12:49:29 +0000
commit6395dbd8190c33d4142c10dda5658335178af5fb (patch)
treeb185b983106e1a28aaa0ef0685cb5b98e6d3f348
parent6ba891cb5adb4de4ce3e09b8bafa5b5035a76399 (diff)
Deploying to gh-pages from @ dandavison/delta@b2f4704d2807eaa04b75df999b05f21b3d248d2a 🚀
-rw-r--r--choosing-colors-styles.html2
-rw-r--r--configuration.html2
-rw-r--r--environment-variables.html2
-rw-r--r--features-named-groups-of-settings.html4
-rw-r--r--full---help-output.html2
-rw-r--r--print.html24
-rw-r--r--searchindex.js2
-rw-r--r--searchindex.json2
-rw-r--r--side-by-side-view.html2
-rw-r--r--tips-and-tricks/24-bit-color-truecolor.html2
-rw-r--r--tips-and-tricks/mouse-scrolling.html2
-rw-r--r--tips-and-tricks/using-delta-on-windows.html2
-rw-r--r--usage.html4
13 files changed, 26 insertions, 26 deletions
diff --git a/choosing-colors-styles.html b/choosing-colors-styles.html
index 754f62ff..7267122b 100644
--- a/choosing-colors-styles.html
+++ b/choosing-colors-styles.html
@@ -137,7 +137,7 @@
<h1 id="choosing-colors-styles"><a class="header" href="#choosing-colors-styles">Choosing colors (styles)</a></h1>
<p>All options that have a name like <code>--*-style</code> work in the same way. It is very similar to how
colors/styles are specified in a gitconfig file:
-https://git-scm.com/docs/git-config#Documentation/git-config.txt-color</p>
+<a href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-color">https://git-scm.com/docs/git-config#Documentation/git-config.txt-color</a></p>
<p>Here's an example:</p>
<pre><code class="language-gitconfig">[delta]
minus-style = red bold ul &quot;#ffeeee&quot;
diff --git a/configuration.html b/configuration.html
index 4b8f231e..0622af94 100644
--- a/configuration.html
+++ b/configuration.html
@@ -172,7 +172,7 @@
<li><code>git add -p</code></li>
</ul>
<p>To change your delta options in a one-off git command, use <code>git -c</code>. For example</p>
-<pre><code>git -c delta.line-numbers=false show
+<pre><code class="language-sh">git -c delta.line-numbers=false show
</code></pre>
<p>There are several important environment variables that affect delta configuration and which can be used to configure delta dynamically.
Please see <a href="./environment-variables.html">Environment variables</a>.
diff --git a/environment-variables.html b/environment-variables.html
index 8956a74b..488a1b51 100644
--- a/environment-variables.html
+++ b/environment-variables.html
@@ -168,7 +168,7 @@ However, this is deprecated: please use <code>DELTA_PAGER</code> instead.
No other <a href="https://github.com/sharkdp/bat"><code>bat</code></a> environment variables are used by delta, and delta does not use <code>bat</code> when it is running (it does use some code from the excellent <code>bat</code> project, but users don't need to be aware of this).</p>
<h2 id="delta-specific-environment-variables"><a class="header" href="#delta-specific-environment-variables">Delta-specific environment variables</a></h2>
<p>To temporarily activate and inactivate delta features, you can use <code>DELTA_FEATURES</code>, e.g.</p>
-<pre><code>export DELTA_FEATURES='+side-by-side my-feature'
+<pre><code class="language-sh">export DELTA_FEATURES='+side-by-side my-feature'
</code></pre>
<p>(The <code>+</code> means &quot;add these features to those configured in git config&quot;.)</p>
<p>The <code>DELTA_PAGER</code> env var is described above.</p>
diff --git a/features-named-groups-of-settings.html b/features-named-groups-of-settings.html
index 0ea2301a..76713db0 100644
--- a/features-named-groups-of-settings.html
+++ b/features-named-groups-of-settings.html
@@ -160,10 +160,10 @@
<p>The environment variable <code>DELTA_FEATURES</code> can used to enable features from the command line: it should be set to a space-separated string of feature names.
If you precede this with a <code>+</code> symbol, then the features are <em>added</em> to those configured elsewhere, instead of replacing them.
This is very useful, for example to temporarily switch delta to side-by-side mode you can do</p>
-<pre><code>export DELTA_FEATURES=+side-by-side
+<pre><code class="language-sh">export DELTA_FEATURES=+side-by-side
</code></pre>
<p>and to undo that:</p>
-<pre><code>export DELTA_FEATURES=+
+<pre><code class="language-sh">export DELTA_FEATURES=+
</code></pre>
</main>
diff --git a/full---help-output.html b/full---help-output.html
index edb26840..33a26cca 100644
--- a/full---help-output.html
+++ b/full---help-output.html
@@ -135,7 +135,7 @@
<div id="content" class="content">
<main>
<h1 id="full---help-output"><a class="header" href="#full---help-output">Full --help output</a></h1>
-<pre><code>delta 0.15.0
+<pre><code class="language-txt">delta 0.15.0
A viewer for git and diff output
USAGE:
diff --git a/print.html b/print.html
index 318a5dfc..aeb21c42 100644
--- a/print.html
+++ b/print.html
@@ -324,7 +324,7 @@ On MacOS, install <code>less</code> from Homebrew. For Windows, see <a href="./u
<li><code>git add -p</code></li>
</ul>
<p>To change your delta options in a one-off git command, use <code>git -c</code>. For example</p>
-<pre><code>git -c delta.line-numbers=false show
+<pre><code class="language-sh">git -c delta.line-numbers=false show
</code></pre>
<p>There are several important environment variables that affect delta configuration and which can be used to configure delta dynamically.
Please see <a href="./environment-variables.html">Environment variables</a>.
@@ -363,7 +363,7 @@ However, this is deprecated: please use <code>DELTA_PAGER</code> instead.
No other <a href="https://github.com/sharkdp/bat"><code>bat</code></a> environment variables are used by delta, and delta does not use <code>bat</code> when it is running (it does use some code from the excellent <code>bat</code> project, but users don't need to be aware of this).</p>
<h2 id="delta-specific-environment-variables"><a class="header" href="#delta-specific-environment-variables">Delta-specific environment variables</a></h2>
<p>To temporarily activate and inactivate delta features, you can use <code>DELTA_FEATURES</code>, e.g.</p>
-<pre><code>export DELTA_FEATURES='+side-by-side my-feature'
+<pre><code class="language-sh">export DELTA_FEATURES='+side-by-side my-feature'
</code></pre>
<p>(The <code>+</code> means &quot;add these features to those configured in git config&quot;.)</p>
<p>The <code>DELTA_PAGER</code> env var is described above.</p>
@@ -379,19 +379,19 @@ In general however, delta's output is intended for humans, not machines.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="usage"><a class="header" href="#usage">Usage</a></h1>
<p>The main way to use delta is to configure it as the pager for git: see <a href="./configuration.html">Configuration</a>.</p>
<p>Delta can also be used as a shorthand for diffing two files, even if they are not in a git repo: the following two commands do the same thing:</p>
-<pre><code>delta /somewhere/a.txt /somewhere/else/b.txt
+<pre><code class="language-sh">delta /somewhere/a.txt /somewhere/else/b.txt
git diff /somewhere/a.txt /somewhere/else/b.txt
</code></pre>
<p>You can also use <a href="https://en.wikipedia.org/wiki/Process_substitution">process substitution</a> shell syntax with delta, e.g.</p>
-<pre><code>delta &lt;(sort file1) &lt;(sort file2)
+<pre><code class="language-sh">delta &lt;(sort file1) &lt;(sort file2)
</code></pre>
<p>In addition to git output, delta handles standard unified diff format, e.g. <code>diff -u a.txt b.txt | delta</code>.</p>
<p>For Mercurial, you can add delta, with its command line options, to the <code>[pager]</code> section of <code>.hgrc</code>.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="choosing-colors-styles"><a class="header" href="#choosing-colors-styles">Choosing colors (styles)</a></h1>
<p>All options that have a name like <code>--*-style</code> work in the same way. It is very similar to how
colors/styles are specified in a gitconfig file:
-https://git-scm.com/docs/git-config#Documentation/git-config.txt-color</p>
+<a href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-color">https://git-scm.com/docs/git-config#Documentation/git-config.txt-color</a></p>
<p>Here's an example:</p>
<pre><code class="language-gitconfig">[delta]
minus-style = red bold ul &quot;#ffeeee&quot;
@@ -411,7 +411,7 @@ https://git-scm.com/docs/git-config#Documentation/git-config.txt-color</p>
<p>By default, side-by-side view has line-numbers activated, and has syntax highlighting in both the left and right panels: [<a href="./side-by-side-view-1.html">config</a>]</p>
<table><tr><td><img width=800px src="https://user-images.githubusercontent.com/52205/87230973-412eb900-c381-11ea-8aec-cc200290bd1b.png" alt="image" /></td></tr></table>
<p>To activate and deactivate side-by-side view from the command line, consider using the <a href="./features-named-groups-of-settings.html"><code>DELTA_FEATURES</code></a> environment variable. For example:</p>
-<pre><code>export DELTA_FEATURES=+side-by-side # activate
+<pre><code class="language-sh">export DELTA_FEATURES=+side-by-side # activate
export DELTA_FEATURES=+ # deactivate
</code></pre>
<p>To disable the line numbers in side-by-side view, but keep a vertical delimiter line between the left and right panels, use the line-numbers format options. For example:</p>
@@ -457,10 +457,10 @@ Note that <code>git grep</code> can display the &quot;function context&quot; for
<p>The environment variable <code>DELTA_FEATURES</code> can used to enable features from the command line: it should be set to a space-separated string of feature names.
If you precede this with a <code>+</code> symbol, then the features are <em>added</em> to those configured elsewhere, instead of replacing them.
This is very useful, for example to temporarily switch delta to side-by-side mode you can do</p>
-<pre><code>export DELTA_FEATURES=+side-by-side
+<pre><code class="language-sh">export DELTA_FEATURES=+side-by-side
</code></pre>
<p>and to undo that:</p>
-<pre><code>export DELTA_FEATURES=+
+<pre><code class="language-sh">export DELTA_FEATURES=+
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="custom-themes"><a class="header" href="#custom-themes">Custom themes</a></h1>
<p>A &quot;theme&quot; in delta is just a collection of settings grouped together in a named <a href="./features-named-groups-of-settings.html">feature</a>. One of the available settings is <code>syntax-theme</code>: this dictates the colors and styles that are applied to foreground text by the syntax highlighter. Thus the concept of &quot;theme&quot; in delta encompasses not just the foreground syntax-highlighting color theme, but also background colors, decorations such as boxes and under/overlines, etc.</p>
@@ -552,7 +552,7 @@ If <code>hyperlinks</code> is enabled in the <code>[delta]</code> section then e
<p>The languages and color themes that ship with delta are those that ship with bat. So, to propose a new language or color theme for inclusion in delta, it would need to be a helpful addition to bat, in which case please open a PR against bat.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="tips--tricks"><a class="header" href="#tips--tricks">Tips &amp; tricks</a></h1>
<div style="break-before: page; page-break-before: always;"></div><h1 id="24-bit-color-truecolor"><a class="header" href="#24-bit-color-truecolor">24 bit color (truecolor)</a></h1>
-<p>Delta looks best if your terminal application supports 24 bit colors. See https://github.com/termstandard/colors#readme. For example, on MacOS, iTerm2 supports 24-bit colors but Terminal.app does not.</p>
+<p>Delta looks best if your terminal application supports 24 bit colors. See <a href="https://github.com/termstandard/colors#readme">https://github.com/termstandard/colors#readme</a>. For example, on MacOS, iTerm2 supports 24-bit colors but Terminal.app does not.</p>
<p>If your terminal application does not support 24-bit color, delta will still work, by automatically choosing the closest color from those available. See the <code>Colors</code> section of the help output below.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="using-delta-with-tmux"><a class="header" href="#using-delta-with-tmux">Using Delta with tmux</a></h1>
<p>If you're using tmux, it's worth checking that 24 bit color is working correctly. For example, run a color test script like <a href="https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh">this one</a>, or one of the others listed <a href="https://gist.github.com/XVilka/8346728">here</a>. If you do not see smooth color gradients, see the discussion at <a href="https://github.com/tmux/tmux/issues/696">tmux#696</a>. The short version is you need something like this in your <code>~/.tmux.conf</code>:</p>
@@ -578,11 +578,11 @@ attrcolor b &quot;.I&quot; # use bright
</li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="using-delta-on-windows"><a class="header" href="#using-delta-on-windows">Using Delta on Windows</a></h1>
-<p>Delta works on Windows. However, it is essential to use a recent version of <code>less.exe</code>: you can download one from https://github.com/jftuga/less-Windows/releases/latest. If you see incorrect colors and/or strange characters in Delta output, then it is probably because Delta is picking up an old version of <code>less.exe</code> on your system.</p>
+<p>Delta works on Windows. However, it is essential to use a recent version of <code>less.exe</code>: you can download one from <a href="https://github.com/jftuga/less-Windows/releases/latest">https://github.com/jftuga/less-Windows/releases/latest</a>. If you see incorrect colors and/or strange characters in Delta output, then it is probably because Delta is picking up an old version of <code>less.exe</code> on your system.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="mouse-scrolling"><a class="header" href="#mouse-scrolling">Mouse scrolling</a></h1>
<p>If mouse scrolling isn't working correctly, ensure that you have the most recent version of <code>less</code>.</p>
<ul>
-<li>For Windows you can download from https://github.com/jftuga/less-Windows/releases/latest</li>
+<li>For Windows you can download from <a href="https://github.com/jftuga/less-Windows/releases/latest">https://github.com/jftuga/less-Windows/releases/latest</a></li>
<li>For Mac you can install <code>brew install less; brew link less</code></li>
</ul>
<p>Alternatively try setting your <code>DELTA_PAGER</code> environment variable to (at least) <code>less -R</code>. See <a href="https://github.com/dandavison/delta/issues/58">issue #58</a>. See also <a href="https://github.com/sharkdp/bat#using-a-different-pager">bat README / &quot;Using a different pager&quot;</a>, since the <code>DELTA_PAGER</code> environment variable functions very similarly for delta.</p>
@@ -687,7 +687,7 @@ attrcolor b &quot;.I&quot; # use bright
<li><a href="https://github.com/Wilfred/difftastic">Wilfred/difftastic</a></li>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="full---help-output"><a class="header" href="#full---help-output">Full --help output</a></h1>
-<pre><code>delta 0.15.0
+<pre><code class="language-txt">delta 0.15.0
A viewer for git and diff output
USAGE:
diff --git a/searchindex.js b/searchindex.js
index b98f8d96..ca9c53b1 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Object.assign(window.search, {"doc_urls":["introduction.html#a-syntax-highlighting-pager-for-git-diff-and-grep-output","get-started.html#get-started","features.html#features","installation.html#installation","configuration.html#configuration","configuration.html#git-config-file","environment-variables.html#environment-variables","environment-variables.html#git-environment-variables","environment-variables.html#pager-environment-variables","environment-variables.html#delta-specific-environment-variables","how-delta-works.html#how-delta-works","usage.html#usage","choosing-colors-styles.html#choosing-colors-styles","line-numbers.html#line-numbers","side-by-side-view.html#side-by-side-view","grep.html#grep","features-named-groups-of-settings.html#features-named-groups-of-settings","custom-themes.html#custom-themes","diff-highlight-and-diff-so-fancy-emulation.html#diff-highlight-and-diff-so-fancy-emulation","color-moved-support.html#--color-moved-support","navigation-keybindings-for-large-diffs.html#navigation-keybindings-for-large-diffs","merge-conflicts.html#merge-conflicts","git-blame.html#git-blame","supported-languages-and-themes.html#supported-languages-and-themes","tips-and-tricks.html#tips--tricks","tips-and-tricks/24-bit-color-truecolor.html#24-bit-color-truecolor","tips-and-tricks/using-delta-with-tmux.html#using-delta-with-tmux","tips-and-tricks/using-delta-with-gnu-screen.html#using-delta-with-gnu-screen","tips-and-tricks/using-delta-on-windows.html#using-delta-on-windows","tips-and-tricks/mouse-scrolling.html#mouse-scrolling","tips-and-tricks/using-delta-with-magit.html#using-delta-with-magit","tips-and-tricks/export-to-html.html#save-output-with-colors-to-htmlpdf-etc","comparisons-with-other-tools.html#comparisons-with-other-tools","build-delta-from-source.html#build-delta-from-source","related-projects.html#related-projects","related-projects.html#used-by-delta","related-projects.html#using-delta","related-projects.html#similar-projects","full---help-output.html#full---help-output","delta-configs-used-in-screenshots.html#delta-configs-used-in-screenshots","delta-configs-used-in-screenshots.html#side-by-side-view"],"index":{"documentStore":{"docInfo":{"0":{"body":37,"breadcrumbs":8,"title":7},"1":{"body":20,"breadcrumbs":2,"title":1},"10":{"body":84,"breadcrumbs":4,"title":2},"11":{"body":66,"breadcrumbs":2,"title":1},"12":{"body":48,"breadcrumbs":7,"title":3},"13":{"body":25,"breadcrumbs":5,"title":2},"14":{"body":143,"breadcrumbs":7,"title":3},"15":{"body":78,"breadcrumbs":3,"title":1},"16":{"body":141,"breadcrumbs":9,"title":4},"17":{"body":119,"breadcrumbs":5,"title":2},"18":{"body":101,"breadcrumbs":11,"title":5},"19":{"body":275,"breadcrumbs":7,"title":3},"2":{"body":153,"breadcrumbs":2,"title":1},"20":{"body":29,"breadcrumbs":9,"title":4},"21":{"body":56,"breadcrumbs":5,"title":2},"22":{"body":20,"breadcrumbs":5,"title":2},"23":{"body":82,"breadcrumbs":7,"title":3},"24":{"body":0,"breadcrumbs":4,"title":2},"25":{"body":40,"breadcrumbs":10,"title":4},"26":{"body":45,"breadcrumbs":8,"title":3},"27":{"body":131,"breadcrumbs":10,"title":4},"28":{"body":28,"breadcrumbs":8,"title":3},"29":{"body":45,"breadcrumbs":6,"title":2},"3":{"body":161,"breadcrumbs":2,"title":1},"30":{"body":12,"breadcrumbs":8,"title":3},"31":{"body":38,"breadcrumbs":12,"title":5},"32":{"body":14,"breadcrumbs":4,"title":2},"33":{"body":27,"breadcrumbs":6,"title":3},"34":{"body":0,"breadcrumbs":4,"title":2},"35":{"body":7,"breadcrumbs":4,"title":2},"36":{"body":9,"breadcrumbs":4,"title":2},"37":{"body":15,"breadcrumbs":4,"title":2},"38":{"body":3211,"breadcrumbs":6,"title":3},"39":{"body":0,"breadcrumbs":8,"title":4},"4":{"body":0,"breadcrumbs":2,"title":1},"40":{"body":67,"breadcrumbs":7,"title":3},"5":{"body":164,"breadcrumbs":4,"title":3},"6":{"body":0,"breadcrumbs":4,"title":2},"7":{"body":51,"breadcrumbs":5,"title":3},"8":{"body":173,"breadcrumbs":5,"title":3},"9":{"body":24,"breadcrumbs":6,"title":4}},"docs":{"0":{"body":"Code evolves, and we all spend time studying diffs. Delta aims to make this both efficient and enjoyable: it allows you to make extensive changes to the layout and styling of diffs, as well as allowing you to stay arbitrarily close to the default git/diff output. delta with line-numbers activated delta with side-by-side and line-numbers activated","breadcrumbs":"Introduction » A syntax-highlighting pager for git, diff, and grep output","id":"0","title":"A syntax-highlighting pager for git, diff, and grep output"},"1":{"body":"Install delta and add this to your ~/.gitconfig: [core] pager = delta [interactive] diffFilter = delta --color-only [delta] navigate = true [merge] conflictstyle = diff3 [diff] colorMoved = default","breadcrumbs":"Get started » Get started","id":"1","title":"Get started"},"10":{"body":"If you configure delta in gitconfig as above, then git will automatically send its output to delta. Delta in turn passes its own output on to a \"real\" pager. Note that git will only send its output to delta if git believes that its output is going to a terminal (a \"tty\") for a human to read. In other words, if you do something like git diff | grep ... then you don't have to worry about delta changing the output from git, because delta will never be invoked at all. If you need to force delta to be invoked when git itself would not invoke it, then you can always pipe to delta explicitly. For example, git diff | delta | something-that-expects-delta-output-with-colors (in this example, git's output is being sent to a pipe, so git itself will not invoke delta). In general however, delta's output is intended for humans, not machines. If you are interested in the implementation of delta, please see ARCHITECTURE.md .","breadcrumbs":"How delta works » How delta works","id":"10","title":"How delta works"},"11":{"body":"The main way to use delta is to configure it as the pager for git: see Configuration . Delta can also be used as a shorthand for diffing two files, even if they are not in a git repo: the following two commands do the same thing: delta /somewhere/a.txt /somewhere/else/b.txt git diff /somewhere/a.txt /somewhere/else/b.txt You can also use process substitution shell syntax with delta, e.g. delta <(sort file1) <(sort file2) In addition to git output, delta handles standard unified diff format, e.g. diff -u a.txt b.txt | delta. For Mercurial, you can add delta, with its command line options, to the [pager] section of .hgrc.","breadcrumbs":"Usage » Usage","id":"11","title":"Usage"},"12":{"body":"All options that have a name like --*-style work in the same way. It is very similar to how colors/styles are specified in a gitconfig file: https://git-scm.com/docs/git-config#Documentation/git-config.txt-color Here's an example: [delta] minus-style = red bold ul \"#ffeeee\" That means: For removed lines, set the foreground (text) color to 'red', make it bold and underlined, and set the background color to #ffeeee. For full details, see the STYLES section in delta --help .","breadcrumbs":"Usage » Choosing colors (styles) » Choosing colors (styles)","id":"12","title":"Choosing colors (styles)"},"13":{"body":"[delta] line-numbers = true The numbers are displayed in two columns and there are several configuration options: see the LINE NUMBERS section in delta --help for details, and see the next section for an example of configuring line numbers.","breadcrumbs":"Usage » Line numbers » Line numbers","id":"13","title":"Line numbers"},"14":{"body":"[delta] side-by-side = true By default, side-by-side view has line-numbers activated, and has syntax highlighting in both the left and right panels: [ config ] To activate and deactivate side-by-side view from the command line, consider using the DELTA_FEATURES environment variable. For example: export DELTA_FEATURES=+side-by-side # activate\nexport DELTA_FEATURES=+ # deactivate To disable the line numbers in side-by-side view, but keep a vertical delimiter line between the left and right panels, use the line-numbers format options. For example: [delta] side-by-side = true line-numbers-left-format = \"\" line-numbers-right-format = \"│ \" Long lines are wrapped if they do not fit in side-by-side mode. In the image below, the long deleted line in the left panel overflows by a small amount, and the wrapped content is right-aligned in the next line. In contrast, the long replacement line in the right panel overflows by almost an entire line, and so the wrapped content is left aligned in the next line. The arrow markers and ellipsis explain when and how text has been wrapped. For control over the details of line wrapping, see --wrap-max-lines, --wrap-left-symbol, --wrap-right-symbol, --wrap-right-percent, --wrap-right-prefix-symbol, --inline-hint-style. Line wrapping was implemented by @th1000s.","breadcrumbs":"Usage » Side-by-side view » Side-by-side view","id":"14","title":"Side-by-side view"},"15":{"body":"Delta applies syntax-highlighting and other enhancements to standard grep output such as from ripgrep (aka rg), git grep, grep, etc. If you don't need special features of git grep, then for best results pipe rg --json output to delta: this avoids parsing ambiguities that are inevitable with the output of git grep and grep. To customize the colors and syntax highlighting, see grep-match-line-style, grep-match-word-style, grep-context-line-style, grep-file-style, grep-line-number-style. Note that git grep can display the \"function context\" for matches and that delta handles this output specially: see the -p and -W options of git grep.","breadcrumbs":"Usage » Grep » Grep","id":"15","title":"Grep"},"16":{"body":"All delta options can go under the [delta] section in your git config file. However, you can also use named \"features\" to keep things organized: these are sections in git config like [delta \"my-feature\"]. Here's an example using two custom features: [delta] features = unobtrusive-line-numbers decorations whitespace-error-style = 22 reverse [delta \"unobtrusive-line-numbers\"] line-numbers = true line-numbers-minus-style = \"#444444\" line-numbers-zero-style = \"#444444\" line-numbers-plus-style = \"#444444\" line-numbers-left-format = \"{nm:>4}┊\" line-numbers-right-format = \"{np:>4}│\" line-numbers-left-style = blue line-numbers-right-style = blue [delta \"decorations\"] commit-decoration-style = bold yellow box ul file-style = bold yellow ul file-decoration-style = none hunk-header-decoration-style = yellow box The environment variable DELTA_FEATURES can used to enable features from the command line: it should be set to a space-separated string of feature names. If you precede this with a + symbol, then the features are added to those configured elsewhere, instead of replacing them. This is very useful, for example to temporarily switch delta to side-by-side mode you can do export DELTA_FEATURES=+side-by-side and to undo that: export DELTA_FEATURES=+","breadcrumbs":"Usage » \"Features\": named groups of settings » \"Features\": named groups of settings","id":"16","title":"\"Features\": named groups of settings"},"17":{"body":"A \"theme\" in delta is just a collection of settings grouped together in a named feature . One of the available settings is syntax-theme: this dictates the colors and styles that are applied to foreground text by the syntax highlighter. Thus the concept of \"theme\" in delta encompasses not just the foreground syntax-highlighting color theme, but also background colors, decorations such as boxes and under/overlines, etc. The delta git repo contains a collection of themes created by users. These focus on the visual appearance: colors etc. If you want features like side-by-side or navigate, you would set that yourself, after selecting the color theme. To use the delta themes, clone the delta repo (or download the raw themes.gitconfig file) and add the following entry in your gitconfig: [include] path = /PATH/TO/delta/themes.gitconfig Then, add your chosen color theme to your features list, e.g. [delta] features = collared-trogon side-by-side = true ... Note that this terminology differs from bat : bat does not apply background colors, and uses the term \"theme\" to refer to what delta calls syntax-theme. Delta does not have a setting named \"theme\": a theme is a \"feature\", so one uses features to select a theme.","breadcrumbs":"Usage » Custom themes » Custom themes","id":"17","title":"Custom themes"},"18":{"body":"Use --diff-highlight or --diff-so-fancy to activate the respective emulation mode. You may want to know which delta configuration values the emulation mode has selected, so that you can adjust them. To do that, use e.g. delta --diff-so-fancy --show-config: diff-highlight is a perl script distributed with git that allows within-line edits to be identified and highlighted according to colors specified in git config. diff-so-fancy builds on diff-highlight, making various additional improvements to the default git diff output. Both tools provide very helpful ways of viewing diffs, and so delta provides emulation modes for both of them. The within-line highlighting rules employed by diff-highlight (and therefore by diff-so-fancy) are deliberately simpler than Delta's Levenshtein-type edit inference algorithm (see discussion in the diff-highlight README ). diff-highlight's rules could be added to delta as an alternative highlighting algorithm, but that hasn't been done yet.","breadcrumbs":"Usage » diff-highlight and diff-so-fancy emulation » diff-highlight and diff-so-fancy emulation","id":"18","title":"diff-highlight and diff-so-fancy emulation"},"19":{"body":"Recent versions of Git (≥ v2.17, April 2018) are able to detect moved blocks of code and style them differently from the usual removed/added lines. If you have activated this feature in Git, then Delta will automatically detect such differently-styled lines, and display them unchanged, i.e. with the raw colors it receives from Git. To activate the Git feature, use [diff] colorMoved = default and see the Git documentation for the other possible values and associated color configuration. The map-styles option allows us to transform the styles that git emits for color-moved sections into delta styles. Here's an example of using map-styles to assign delta styles to the raw color-moved styles output by git. This feature allows all of git's color-moved options to be rendered using delta styles, including with syntax highlighting. [delta] map-styles = bold purple => syntax magenta, bold cyan => syntax blue There is a pair of features provided in themes.config called zebra-dark and zebra-light which utilise the moved colors by displaying them as a faint background color on the affected lines while keeping syntax highlighting as the foreground color. You can enable one of these features by stacking it upon the theme you are using, like as follows [delta] features = my-dark-theme zebra-dark It is also possible to reference other styles. [delta] features = my-color-moved-theme [delta \"my-color-moved-theme\"] git-moved-from-style = bold purple # An ad-hoc named style (must end in \"-style\") map-styles = \"my-color-moved-theme.git-moved-from-style => red #cccccc, \\ bold cyan => syntax #cccccc\" # we could also have defined git-moved-to-style = bold cyan To make use of that, you need to know that git is emitting \"bold cyan\" and \"bold purple\". But that's not always obvious. To help with that, delta now has a --parse-ansi mode. E.g. git show --color=always | delta --parse-ansi outputs something like this: As you see above, we can now define named styles in gitconfig and refer to them in places where a style string is expected. We can also define custom named colors in git config, and styles can reference other styles; see the hoopoe theme for an example: [delta \"hoopoe\"] green = \"#d0ffd0\" # ad-hoc named color plus-style = syntax hoopoe.green # refer to named color plus-non-emph-style = plus-style # styles can reference other styles Additionally, we can now use the 140 color names that are standard in CSS. Use delta --show-colors to get a demo of the available colors, as background colors to see how they look with syntax highlighting:","breadcrumbs":"Usage » --color-moved support » --color-moved support","id":"19","title":"--color-moved support"},"2":{"body":"Language syntax highlighting with color themes Within-line highlights based on a Levenshtein edit inference algorithm Side-by-side view with line-wrapping Line numbering n and N keybindings to move between files in large diffs, and between diffs in log -p views (--navigate) Improved merge conflict display Improved git blame display (syntax highlighting; --hyperlinks formats commits as links to GitHub/GitLab/Bitbucket etc) Syntax-highlights grep output from rg, git grep, grep, etc Support for Git's --color-moved feature. Code can be copied directly from the diff (-/+ markers are removed by default). diff-highlight and diff-so-fancy emulation modes Commit hashes can be formatted as terminal hyperlinks to the GitHub/GitLab/Bitbucket page (--hyperlinks). File paths can also be formatted as hyperlinks for opening in your OS. Stylable box/line decorations to draw attention to commit, file and hunk header sections. Git style strings (foreground color, background color, font attributes) are supported for >20 stylable elements delta git diff-so-fancy / diff-highlight github/gitlab language syntax highlighting ✅ ❌ ❌ ✅ within-line insertion/deletion detection ✅ ❌ ✅ ✅ multiple insertion/deletions detected per line ✅ ❌ ❌ ✅ matching of unequal numbers of changed lines ✅ ❌ ❌ ❌ independently stylable elements ✅ ✅ ✅ ❌ line numbering ✅ ❌ ❌ ✅ side-by-side view ✅ ❌ ❌ ✅ In addition, delta handles traditional unified diff output.","breadcrumbs":"Features » Features","id":"2","title":"Features"},"20":{"body":"Use the navigate feature to activate navigation keybindings. In this mode, pressing n will jump forward to the next file in the diff, and N will jump backwards. If you are viewing multiple commits (e.g. via git log -p) then navigation will also visit commit boundaries.","breadcrumbs":"Usage » Navigation keybindings for large diffs » Navigation keybindings for large diffs","id":"20","title":"Navigation keybindings for large diffs"},"21":{"body":"Consider setting [merge] conflictstyle = diff3 With that setting, when a merge conflict is encountered, delta will display diffs between the ancestral commit and each of the two merge parents: This display can be customized using merge-conflict-begin-symbol, merge-conflict-end-symbol, merge-conflict-ours-diff-header-style, merge-conflict-ours-diff-header-decoration-style, merge-conflict-theirs-diff-header-style, merge-conflict-theirs-diff-header-decoration-style.","breadcrumbs":"Usage » Merge conflicts » Merge conflicts","id":"21","title":"Merge conflicts"},"22":{"body":"Set delta as the pager for blame in the [pager] section of your gitconfig: see the example gitconfig . If hyperlinks is enabled in the [delta] section then each blame commit will link to the commit on GitHub/GitLab/Bitbucket/etc.","breadcrumbs":"Usage » Git blame » Git blame","id":"22","title":"Git blame"},"23":{"body":"To list the supported languages and color themes, use delta --list-languages and delta --list-syntax-themes. To see a demo of the color themes, use delta --show-syntax-themes: To add your own custom color theme, or language, please follow the instructions in the Customization section of the bat documentation : Adding a custom language Adding a custom theme Delta automatically recognizes custom themes and languages added to bat. You will need to install bat in order to run the bat cache --build command. The languages and color themes that ship with delta are those that ship with bat. So, to propose a new language or color theme for inclusion in delta, it would need to be a helpful addition to bat, in which case please open a PR against bat.","breadcrumbs":"Usage » Supported languages and themes » Supported languages and themes","id":"23","title":"Supported languages and themes"},"24":{"body":"","breadcrumbs":"Tips & tricks » Tips & tricks","id":"24","title":"Tips & tricks"},"25":{"body":"Delta looks best if your terminal application supports 24 bit colors. See https://github.com/termstandard/colors#readme. For example, on MacOS, iTerm2 supports 24-bit colors but Terminal.app does not. If your terminal application does not support 24-bit color, delta will still work, by automatically choosing the closest color from those available. See the Colors section of the help output below.","breadcrumbs":"Tips & tricks » 24 bit color (truecolor) » 24 bit color (truecolor)","id":"25","title":"24 bit color (truecolor)"},"26":{"body":"If you're using tmux, it's worth checking that 24 bit color is working correctly. For example, run a color test script like this one , or one of the others listed here . If you do not see smooth color gradients, see the discussion at tmux#696 . The short version is you need something like this in your ~/.tmux.conf: set -ga terminal-overrides \",xterm-256color:Tc\" and you may then need to quit tmux completely for it to take effect.","breadcrumbs":"Tips & tricks » Using Delta with tmux » Using Delta with tmux","id":"26","title":"Using Delta with tmux"},"27":{"body":"True color output in GNU Screen is currently only possible when using a development build, as support for it is not yet implemented in the (v4) release versions. A snapshot of the latest Git trunk can be obtained via https://git.savannah.gnu.org/cgit/screen.git/snapshot/screen-master.tar.gz - the required build steps are described in the src/INSTALL file. After installing the program, 24-bit color support can be activated by including truecolor on in either the system's or the user's screenrc file. When working in Screen without true color output, it might be that colors supposed to be different look the same in XTerm compatible terminals. If that is the case, make sure the following settings are included in your screenrc file: term screen-256color\ntermcapinfo xterm 'Co#256:AB=\\E[48;5;%dm:AF=\\E[38;5;%dm' # ANSI (256-color) patterns - AB: background, AF: foreground\nattrcolor b \".I\" # use bright colors for bold text If despite having those settings you still only get a limited set of colors, your build of Screen might have been configured without the --enable-colors256 flag. If this is the case, you have two options : If available for your OS, get a different package of Screen. Otherwise Build your own binary : Download and extract a release tarball from https://ftp.gnu.org/gnu/screen/ cd into the newly extracted folder Follow the instructions in the INSTALL file, and when running the ./configure command apply the --enable-colors256 flag.","breadcrumbs":"Tips & tricks » Using Delta with GNU Screen » Using Delta with GNU Screen","id":"27","title":"Using Delta with GNU Screen"},"28":{"body":"Delta works on Windows. However, it is essential to use a recent version of less.exe: you can download one from https://github.com/jftuga/less-Windows/releases/latest. If you see incorrect colors and/or strange characters in Delta output, then it is probably because Delta is picking up an old version of less.exe on your system.","breadcrumbs":"Tips & tricks » Using Delta on Windows » Using Delta on Windows","id":"28","title":"Using Delta on Windows"},"29":{"body":"If mouse scrolling isn't working correctly, ensure that you have the most recent version of less. For Windows you can download from https://github.com/jftuga/less-Windows/releases/latest For Mac you can install brew install less; brew link less Alternatively try setting your DELTA_PAGER environment variable to (at least) less -R. See issue #58 . See also bat README / \"Using a different pager\" , since the DELTA_PAGER environment variable functions very similarly for delta.","breadcrumbs":"Tips & tricks » Mouse scrolling » Mouse scrolling","id":"29","title":"Mouse scrolling"},"3":{"body":"You can download an executable for your system: Linux (glibc) | Linux (musl) | MacOS | Windows | All Alternatively you can install delta using a package manager: see repology.org/git-delta . Note that the package is often called git-delta, but the executable installed is called delta. Here is a quick summary for selected package managers: Arch Linux pacman -S git-delta Cargo cargo install git-delta Fedora dnf install git-delta FreeBSD pkg install git-delta Gentoo emerge dev-util/git-delta Homebrew brew install git-delta MacPorts port install git-delta Nix nix-env -iA nixpkgs.delta OpenBSD pkg_add delta openSUSE Tumbleweed zypper install git-delta Void Linux xbps-install -S delta Windows (Chocolatey) choco install delta Windows (Scoop) scoop install delta Wi