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
Allow configuring an array of pagers, and cycling through them with the
`|` key (mnemonic: we are piping the output through something). I find
this useful for switching between delta (which I prefer most of the
time) and difftastic (which occasionally produces better output for
certain kinds of changes). It could also be used to switch between delta
in inline mode and in side-by-side mode.
Copy file name to clipboardExpand all lines: docs/Custom_Pagers.md
+24-21Lines changed: 24 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,27 @@ Lazygit supports custom pagers, [configured](/docs/Config.md) in the config.yml
4
4
5
5
Support does not extend to Windows users, because we're making use of a package which doesn't have Windows support. However, see [below](#emulating-custom-pagers-on-windows) for a workaround.
6
6
7
-
## Default:
7
+
Multiple pagers are supported; you can cycle through them with the `|` key. This can be useful if you usually prefer a particular pager, but want to use a different one for certain kinds of diffs.
8
+
9
+
Pagers are configured with the `pagers` array in the git section; here's an example for a multi-pager setup:
the`colorArg` key is for whether you want the `--color=always` arg in your `git diff` command. Some pagers want it set to `always`, others want it set to `never`.
20
+
The`colorArg` key is for whether you want the `--color=always` arg in your `git diff` command. Some pagers want it set to `always`, others want it set to `never`. The default is `always`, since that's what most pagers need.
16
21
17
22
## Delta:
18
23
19
24
```yaml
20
25
git:
21
-
paging:
22
-
colorArg: always
23
-
pager: delta --dark --paging=never
26
+
pagers:
27
+
- pager: delta --dark --paging=never
24
28
```
25
29
26
30

@@ -31,9 +35,8 @@ A cool feature of delta is --hyperlinks, which renders clickable links for the l
31
35
32
36
```yaml
33
37
git:
34
-
paging:
35
-
colorArg: always
36
-
pager: diff-so-fancy
38
+
pagers:
39
+
- pager: diff-so-fancy
37
40
```
38
41
39
42

@@ -44,9 +47,9 @@ git:
44
47
gui:
45
48
sidePanelWidth: 0.2 # gives you more space to show things side-by-side
Instead of setting this command in lazygit's `externalDiffCommand` config, you can also tell lazygit to use the external diff command that is configured in git itself (`diff.external`), by using
79
82
80
83
```yaml
81
84
git:
82
-
paging:
83
-
useExternalDiffGitConfig: true
85
+
pagers:
86
+
- useExternalDiffGitConfig: true
84
87
```
85
88
86
89
This can be useful if you also want to use it for diffs on the command line, and it also has the advantage that you can configure it per file type in `.gitattributes`; see https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.
The main limitation of this approach compared to a "real" pager is that renames are not displayed correctly; they are shown as if they were modifications of the old file. (This affects only the hunk headers; the diff itself is always correct.)
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_en.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
24
24
|`` R ``| Refresh | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |
25
25
|`` + ``| Next screen mode (normal/half/fullscreen) ||
26
26
|`` _ ``| Prev screen mode ||
27
+
| `` | `` | Cycle pagers | Choose the next pager in the list of configured pagers |
27
28
|`` <esc> ``| Cancel ||
28
29
|`` ? ``| Open keybindings menu ||
29
30
|`` <c-s> ``| View filter options | View options for filtering the commit log, so that only commits matching the filter are shown. |
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_ko.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
24
24
|`` R ``| 새로고침 | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |
25
25
|`` + ``| 다음 스크린 모드 (normal/half/fullscreen) ||
26
26
|`` _ ``| 이전 스크린 모드 ||
27
+
| `` | `` | Cycle pagers | Choose the next pager in the list of configured pagers |
27
28
|`` <esc> ``| 취소 ||
28
29
|`` ? ``| 매뉴 열기 ||
29
30
|`` <c-s> ``| View filter-by-path options | View options for filtering the commit log, so that only commits matching the filter are shown. |
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_nl.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
24
24
|`` R ``| Verversen | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |
25
25
|`` + ``| Volgende scherm modus (normaal/half/groot) ||
26
26
|`` _ ``| Vorige scherm modus ||
27
+
| `` | `` | Cycle pagers | Choose the next pager in the list of configured pagers |
27
28
|`` <esc> ``| Annuleren ||
28
29
|`` ? ``| Open menu ||
29
30
|`` <c-s> ``| Bekijk scoping opties | View options for filtering the commit log, so that only commits matching the filter are shown. |
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_pl.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ _Legenda: `<c-b>` oznacza ctrl+b, `<a-b>` oznacza alt+b, `B` oznacza shift+b_
24
24
|`` R ``| Odśwież | Odśwież stan git (tj. uruchom `git status`, `git branch`, itp. w tle, aby zaktualizować zawartość paneli). To nie uruchamia `git fetch`. |
25
25
|`` + ``| Następny tryb ekranu (normalny/półpełny/pełnoekranowy) ||
26
26
|`` _ ``| Poprzedni tryb ekranu ||
27
+
| `` | `` | Cycle pagers | Choose the next pager in the list of configured pagers |
27
28
|`` <esc> ``| Anuluj ||
28
29
|`` ? ``| Otwórz menu przypisań klawiszy ||
29
30
|`` <c-s> ``| Pokaż opcje filtrowania | Pokaż opcje filtrowania dziennika commitów, tak aby pokazywane były tylko commity pasujące do filtra. |
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_pt.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
24
24
|`` R ``| Atualizar | Atualize o estado do git (ou seja, execute `git status`, `git branch`, etc em segundo plano para atualizar o conteúdo de painéis). Isso não executa `git fetch`. |
25
25
|`` + ``| Next screen mode (normal/half/fullscreen) ||
26
26
|`` _ ``| Prev screen mode ||
27
+
| `` | `` | Cycle pagers | Choose the next pager in the list of configured pagers |
27
28
|`` <esc> ``| Cancelar ||
28
29
|`` ? ``| Open keybindings menu ||
29
30
|`` <c-s> ``| View filter options | View options for filtering the commit log, so that only commits matching the filter are shown. |
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_ru.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ _Связки клавиш_
24
24
|`` R ``| Обновить | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |
25
25
|`` + ``| Следующий режим экрана (нормальный/полуэкранный/полноэкранный) ||
26
26
|`` _ ``| Предыдущий режим экрана ||
27
+
| `` | `` | Cycle pagers | Choose the next pager in the list of configured pagers |
27
28
|`` <esc> ``| Отменить ||
28
29
|`` ? ``| Открыть меню ||
29
30
|`` <c-s> ``| Просмотреть параметры фильтрации по пути | View options for filtering the commit log, so that only commits matching the filter are shown. |
0 commit comments