Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 56 additions & 50 deletions docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ git:
- git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium

# If true, git diffs are rendered with the `--ignore-all-space` flag, which
# ignores whitespace changes. Can be toggled from within Lazygit with `<c-w>`.
# ignores whitespace changes. Can be toggled from within Lazygit with
# `<ctrl+w>`.
ignoreWhitespaceInDiffView: false

# The number of lines of context to show around each diff hunk. Can be changed
Expand Down Expand Up @@ -468,14 +469,14 @@ git:
# appear chronologically. See https://git-scm.com/docs/
#
# Can be changed from within Lazygit with `Log menu -> Commit sort order`
# (`<c-l>` in the commits window by default).
# (`<ctrl+l>` in the commits window by default).
order: topo-order

# This determines whether the git graph is rendered in the commits panel
# One of 'always' | 'never' | 'when-maximised'
#
# Can be toggled from within lazygit with `Log menu -> Show git graph` (`<c-l>`
# in the commits window by default).
# Can be toggled from within lazygit with `Log menu -> Show git graph`
# (`<ctrl+l>` in the commits window by default).
showGraph: always

# displays the whole git graph by default in the commits view (equivalent to
Expand Down Expand Up @@ -590,36 +591,30 @@ notARepository: prompt
# view the output of the subprocess before returning to Lazygit.
promptToReturnFromSubprocess: true

# Keybindings
# Keybindings.
# Each binding can be a single key or a list of keys; see
# https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md
# for the syntax.
keybinding:
universal:
quit: q
quit-alt1: <c-c>
suspendApp: <c-z>
quit: [q, <ctrl+c>]
suspendApp: <ctrl+z>
return: <esc>
quitWithoutChangingDirectory: Q
togglePanel: <tab>
prevItem: <up>
nextItem: <down>
prevItem-alt: k
nextItem-alt: j
prevItem: [<up>, k]
nextItem: [<down>, j]
prevPage: ','
nextPage: .
scrollLeft: H
scrollRight: L
gotoTop: <
gotoBottom: '>'
gotoTop-alt: <home>
gotoBottom-alt: <end>
gotoTop: [<, <home>]
gotoBottom: ['>', <end>]
toggleRangeSelect: v
rangeSelectDown: <s-down>
rangeSelectUp: <s-up>
prevBlock: <left>
nextBlock: <right>
prevBlock-alt: h
nextBlock-alt: l
nextBlock-alt2: <tab>
prevBlock-alt2: <backtab>
rangeSelectDown: <shift+down>
rangeSelectUp: <shift+up>
prevBlock: [<left>, h, <backtab>]
nextBlock: [<right>, l, <tab>]
jumpToBlock:
- "1"
- "2"
Expand All @@ -630,25 +625,33 @@ keybinding:
nextMatch: "n"
prevMatch: "N"
startSearch: /
optionMenu: <disabled>
optionMenu-alt1: '?'

# <alt+left> on Mac
moveWordLeft: <ctrl+left>

# <alt+right> on Mac
moveWordRight: <ctrl+right>

# <alt+backspace> on Mac
backspaceWord: <ctrl+backspace>

# <alt+delete> on Mac
forwardDeleteWord: <ctrl+delete>
optionMenu: '?'
select: <space>
goInto: <enter>
confirm: <enter>
confirmMenu: <enter>
confirmSuggestion: <enter>
confirmInEditor: <a-enter>
confirmInEditor-alt: <c-s>

# <meta+enter> on Mac
confirmInEditor: [<ctrl+enter>, <ctrl+s>]
remove: d
new: "n"
edit: e
openFile: o
scrollUpMain: <pgup>
scrollDownMain: <pgdown>
scrollUpMain-alt1: K
scrollDownMain-alt1: J
scrollUpMain-alt2: <c-u>
scrollDownMain-alt2: <c-d>
scrollUpMain: [<pgup>, K, <ctrl+u>]
scrollDownMain: [<pgdown>, J, <ctrl+d>]
executeShellCommand: ':'
createRebaseOptionsMenu: m

Expand All @@ -658,27 +661,26 @@ keybinding:
# 'Files' appended for legacy reasons
pullFiles: p
refresh: R
createPatchOptionsMenu: <c-p>
createPatchOptionsMenu: <ctrl+p>
nextTab: ']'
prevTab: '['
nextScreenMode: +
prevScreenMode: _
cyclePagers: '|'
undo: z
redo: Z
filteringMenu: <c-s>
diffingMenu: W
diffingMenu-alt: <c-e>
copyToClipboard: <c-o>
openRecentRepos: <c-r>
filteringMenu: <ctrl+s>
diffingMenu: [W, <ctrl+e>]
copyToClipboard: <ctrl+o>
openRecentRepos: <ctrl+r>
submitEditorText: <enter>
extrasMenu: '@'
toggleWhitespaceInDiffView: <c-w>
toggleWhitespaceInDiffView: <ctrl+w>
increaseContextInDiffView: '}'
decreaseContextInDiffView: '{'
increaseRenameSimilarityThreshold: )
decreaseRenameSimilarityThreshold: (
openDiffTool: <c-t>
openDiffTool: <ctrl+t>
status:
checkForUpdate: u
recentRepos: <enter>
Expand All @@ -689,7 +691,7 @@ keybinding:
commitChangesWithoutHook: w
amendLastCommit: A
commitChangesWithEditor: C
findBaseCommitForFixup: <c-f>
findBaseCommitForFixup: <ctrl+f>
confirmDiscard: x
ignoreFile: i
refreshFiles: r
Expand All @@ -700,15 +702,15 @@ keybinding:
fetch: f
toggleTreeView: '`'
openMergeOptions: M
openStatusFilter: <c-b>
openStatusFilter: <ctrl+b>
copyFileInfoToClipboard: "y"
collapseAll: '-'
expandAll: =
branches:
createPullRequest: o
viewPullRequestOptions: O
openPullRequestInBrowser: G
copyPullRequestURL: <c-y>
copyPullRequestURL: <ctrl+y>
checkoutBranchByName: c
forceCheckoutBranch: F
checkoutPreviousBranch: '-'
Expand All @@ -735,8 +737,8 @@ keybinding:
setFixupMessage: c
createFixupCommit: F
squashAboveCommits: S
moveDownCommit: <c-j>
moveUpCommit: <c-k>
moveDownCommit: [<ctrl+j>, <alt-down>]
moveUpCommit: [<ctrl+k>, <alt-up>]
amendToCommit: A
resetCommitAuthor: a
pickCommit: p
Expand All @@ -746,9 +748,9 @@ keybinding:
markCommitAsBaseForRebase: B
tagCommit: T
checkoutCommit: <space>
resetCherryPick: <c-R>
resetCherryPick: <ctrl+r>
copyCommitAttributeToClipboard: "y"
openLogMenu: <c-l>
openLogMenu: <ctrl+l>
openInBrowser: o
openPullRequestInBrowser: G
viewBisectOptions: b
Expand All @@ -764,6 +766,8 @@ keybinding:
commitFiles:
checkoutCommitFile: c
main:
prevHunk: [<left>, h]
nextHunk: [<right>, l]
toggleSelectHunk: a
pickBothHunks: b
editSelectHunk: E
Expand All @@ -772,7 +776,7 @@ keybinding:
update: u
bulkMenu: b
commitMessage:
commitMenu: <c-o>
commitMenu: <ctrl+o>
```
<!-- END CONFIG YAML -->

Expand Down Expand Up @@ -1102,6 +1106,8 @@ Where:
- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab`, `gitea` or `codeberg`
- `webDomain` is the URL where your git service exposes a web interface and APIs, e.g. `gitservice.work.com`

For the `github` provider, configuring an entry here also enables the pull-request icons in the branches panel for that host (e.g. a GitHub Enterprise Server instance). Lazygit picks up the auth token via the same mechanisms as the `gh` CLI: the `GH_ENTERPRISE_TOKEN` / `GITHUB_ENTERPRISE_TOKEN` environment variables, or `gh auth login --hostname <webDomain>`.

## Predefined commit message prefix

In situations where certain naming pattern is used for branches and commits, pattern can be used to populate commit message with prefix that is parsed from the branch name.
Expand Down
4 changes: 2 additions & 2 deletions docs/Custom_Command_Keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Custom command keybindings will appear alongside inbuilt keybindings when you vi
For a given custom command, here are the allowed fields:
| _field_ | _description_ | required |
|-----------------|----------------------|-|
| key | The key to trigger the command. Use a single letter or one of the values from [here](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md). Custom commands without a key specified can be triggered by selecting them from the keybindings (`?`) menu | no |
| key | The key to trigger the command. Use a single key or list of keys, as described in [Custom_Keybindings.md](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md). Custom commands without a key specified can be triggered by selecting them from the keybindings (`?`) menu | no |
| command | The command to run (using Go template syntax for placeholder values) | yes |
| context | The context in which to listen for the key (see [below](#contexts)) | yes |
| prompts | A list of prompts that will request user input before running the final command | no |
Expand Down Expand Up @@ -193,7 +193,7 @@ The permitted option fields are:
| name | The first part of the label | no |
| description | The second part of the label | no |
| value | the value that will be used in the command | yes |
| key | Keybinding to invoke this menu option without needing to navigate to it. Can be a single letter or one of the values from [here](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) | no |
| key | Keybinding to invoke this menu option without needing to navigate to it. Use a single key or list of keys, as described in [Custom_Keybindings.md](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) | no |

If an option has no name the value will be displayed to the user in place of the name, so you're allowed to only include the value like so:

Expand Down
2 changes: 1 addition & 1 deletion docs/Undoing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Undo/Redo in lazygit

You can undo the last action by pressing 'z' and redo with `ctrl+z`. Here we drop a couple of commits and then undo the actions.
You can undo the last action by pressing 'z' and redo with 'Z' (shift+z). Here we drop a couple of commits and then undo the actions.
Undo uses the reflog which is specific to commits and branches so we can't undo changes to the working tree or stash.

![undo](../../assets/demo/undo-compressed.gif)
Expand Down
Loading
Loading