You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Custom_Pagers.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,3 +62,25 @@ git:
62
62
```
63
63
64
64
If you set `useConfig: true`, lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
65
+
66
+
## Using external diff commands
67
+
68
+
Some diff tools can't work as a simple pager like the ones above do, because they need access to the entire diff, so just post-processing git's diff is not enough for them. The most notable example is probably [difftastic](https://difftastic.wilfred.me.uk).
69
+
70
+
These can be used in lazygit by using the `externalDiffCommand` config; in the case of difftastic, that could be
71
+
72
+
```yaml
73
+
git:
74
+
paging:
75
+
externalDiffCommand: difft --color=always
76
+
```
77
+
78
+
The `colorArg`, `pager`, and `useConfig` options are not used in this case.
79
+
80
+
You can add whatever extra arguments you prefer for your difftool; for instance
0 commit comments