summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-03-03 23:07:12 +1100
committerGitHub <noreply@github.com>2020-03-03 23:07:12 +1100
commit9912998bb7bc2a1323e2f1db784e083aa1a5437b (patch)
treebcc82d71b7086b6a2d4e7d3be25517b42527a172 /docs
parente223d3d8de5c34baf406aac56a3482952aa6c289 (diff)
Create Custom_Pagers.md
Diffstat (limited to 'docs')
-rw-r--r--docs/Custom_Pagers.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/docs/Custom_Pagers.md b/docs/Custom_Pagers.md
new file mode 100644
index 000000000..02c913ea0
--- /dev/null
+++ b/docs/Custom_Pagers.md
@@ -0,0 +1,49 @@
+# Custom Pagers
+
+Lazygit supports custom pagers, [configured](/docs/Config.md) in the config.yml file (which can be opened by pressing 'o' in the Status panel).
+
+Support does not extend to windows users, because we're making use of a package which doesn't have windows support.
+
+## Default:
+
+```yaml
+git:
+ paging:
+ colorArg: always
+ useConfig: false
+```
+
+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'.
+
+## Delta:
+
+```yaml
+git:
+ paging:
+ colorArg: always
+ pager: delta --dark --paging=never --24-bit-color=never
+```
+
+![](https://i.imgur.com/A4C3xiZ.png)
+
+## Diff-so-fancy
+
+```yaml
+git:
+ paging:
+ colorArg: always
+ pager: diff-so-fancy
+```
+
+![](https://i.imgur.com/rjH1TpT.png)
+
+## Using git config
+
+```yaml
+git:
+ paging:
+ colorArg: always
+ useConfig: true
+```
+
+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).