Debian Codegraph @

manual/src/features-named-groups-of-settings.md

raw symbols SCIP
1 # "Features": named groups of settings
2
3 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:
4
5 ```gitconfig
6 [delta]
7 features = unobtrusive-line-numbers decorations
8 whitespace-error-style = 22 reverse
9
10 [delta "unobtrusive-line-numbers"]
11 line-numbers = true
12 line-numbers-minus-style = "#444444"
13 line-numbers-zero-style = "#444444"
14 line-numbers-plus-style = "#444444"
15 line-numbers-left-format = "{nm:>4}┊"
16 line-numbers-right-format = "{np:>4}│"
17 line-numbers-left-style = blue
18 line-numbers-right-style = blue
19
20 [delta "decorations"]
21 commit-decoration-style = bold yellow box ul
22 file-style = bold yellow ul
23 file-decoration-style = none
24 hunk-header-decoration-style = yellow box
25 ```
26
27 <table><tr><td><img width=400px src="https://user-images.githubusercontent.com/52205/86275048-a96ee500-bba0-11ea-8a19-584f69758aee.png" alt="image" /></td></tr></table>
28
29 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.
30 If you precede this with a `+` symbol, then the features are _added_ to those configured elsewhere, instead of replacing them.
31 This is very useful, for example to temporarily switch delta to side-by-side mode you can do
32
33 ```sh
34 export DELTA_FEATURES=+side-by-side
35 ```
36
37 and to undo that:
38
39 ```sh
40 export DELTA_FEATURES=+
41 ```