docs(delta): add all sorts of goodies to cheat sheet
[webi-installers/.git] / delta / README.md
1 ---
2 title: delta
3 homepage: https://github.com/dandavison/delta
4 tagline: |
5   delta: A syntax-highlighting pager for git and diff output
6 ---
7
8 To update or switch versions, run `webi delta` (or `@0.9.1`, `@0.9.0`, etc).
9
10 ## Cheat Sheet
11
12 > `delta` gives you GitHub-style diffs, with word-level diff coloring, right in
13 > your trusty rusty terminal.
14
15 ![](https://user-images.githubusercontent.com/52205/65248525-32250480-daea-11e9-9965-1a05c6a4bdf4.png)
16
17 Here we'll cover:
18
19 - **The install**: which files are added or changed
20 - **Configuration**: how to set a syntax theme
21 - **Preview**: how to list or show the color schemes
22 - **Manual Config**: how to turn `delta` on or off for git diffs
23
24 For the full set of options, be sure to check out the helpful
25 [README](https://github.com/dandavison/delta).
26
27 ## Files
28
29 These are the files that are created and/or modified with this installer:
30
31 ```txt
32 ~/.config/envman/PATH.env
33 ~/.gitconfig
34 ~/.local/bin/delta
35 ~/.local/opt/delta-VERSION/bin/delta
36 ```
37
38 ## How to set delta's color scheme
39
40 Delta uses `~/.gitconfig` for most of its options.
41
42 Set `delta.syntax-theme` to change the color scheme:
43
44 ```bash
45 git config delta.syntax-theme 'Coldark-Dark'
46 ```
47
48 ## How to list / preview delta's themes
49
50 You can list all available themes with `--list-syntax-themes`, or see each color
51 schemes in action with `--show-syntax-themes`:
52
53 ```bash
54 delta --list-syntax-themes --dark
55 delta --show-syntax-themes --dark
56 ```
57
58 You can also show only light or dark themes:
59
60 ```bash
61 delta --list-syntax-themes --light
62 delta --show-syntax-themes --light
63 ```
64
65 ```bash
66 delta --list-syntax-themes --dark
67 delta --show-syntax-themes --dark
68 ```
69
70 Here's the current list, for convenience:
71
72 ### Dark Syntax Themes
73
74 ```txt
75 1337
76 Coldark-Cold
77 Coldark-Dark
78 DarkNeon
79 Dracula
80 Monokai Extended
81 Monokai Extended Bright
82 Monokai Extended Origin
83 Nord
84 OneHalfDark
85 Solarized (dark)
86 Sublime Snazzy
87 TwoDark
88 Visual Studio Dark+
89 ansi
90 base16
91 base16-256
92 gruvbox-dark
93 zenburn
94 ```
95
96 ### Light Syntax Themes
97
98 ```txt
99 GitHub
100 Monokai Extended Light
101 OneHalfLight
102 Solarized (light)
103 gruvbox-light
104 ```
105
106 ## How to manually configure git to use delta
107
108 You can use `git config --global` to get or set any arbitrary option of
109 `~/.gitconfig`.
110
111 ```bash
112 git config --global page.diff delta
113 git config --global page.show delta
114 git config --global page.log delta
115 git config --global page.blame delta
116 git config --global page.reflog delta
117
118 git config --global interactive.diffFilter 'delta --color-only'
119
120 git config delta.syntax-theme 'Coldark-Dark'
121 ```
122
123 Your `~/.gitconfig` will then contain these sections and options:
124
125 ```gitconfig
126 [pager]
127     diff = delta
128     show = delta
129     log = delta
130     blame = delta
131     reflog = delta
132
133 [interactive]
134     diffFilter = delta --color-only
135
136 [delta]
137     syntax-theme = Coldark-Dark
138 ```