Skip to content

Commit f7a4092

Browse files
authored
Wrap long lines in comments in Config.md (#4951)
Since these are displayed in a fenced code block on github, they aren't auto-wrapped on display, so users have to scroll horizontally to read longer paragraphs. Addresses #800 (comment).
2 parents 30169bd + db9fb21 commit f7a4092

File tree

4 files changed

+154
-91
lines changed

4 files changed

+154
-91
lines changed

docs/Config.md

Lines changed: 111 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,15 @@ gui:
6464
# One of: 'margin' (default) | 'jump'
6565
scrollOffBehavior: margin
6666

67-
# The number of spaces per tab; used for everything that's shown in the main view, but probably mostly relevant for diffs.
68-
# Note that when using a pager, the pager has its own tab width setting, so you need to pass it separately in the pager command.
67+
# The number of spaces per tab; used for everything that's shown in the main
68+
# view, but probably mostly relevant for diffs.
69+
# Note that when using a pager, the pager has its own tab width setting, so you
70+
# need to pass it separately in the pager command.
6971
tabWidth: 4
7072

7173
# If true, capture mouse events.
72-
# When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
74+
# When mouse events are captured, it's a little harder to select text: e.g.
75+
# requiring you to hold the option key when on macOS.
7376
mouseEvents: true
7477

7578
# If true, do not show a warning when amending a commit.
@@ -81,45 +84,57 @@ gui:
8184
# If true, do not show warning when applying/popping the stash
8285
skipStashWarning: false
8386

84-
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
87+
# If true, do not show a warning when attempting to commit without any staged
88+
# files; instead stage all unstaged files.
8589
skipNoStagedFilesWarning: false
8690

8791
# If true, do not show a warning when rewording a commit via an external editor
8892
skipRewordInEditorWarning: false
8993

90-
# Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.
94+
# Fraction of the total screen width to use for the left side section. You may
95+
# want to pick a small number (e.g. 0.2) if you're using a narrow screen, so
96+
# that you can see more of the main section.
9197
# Number from 0 to 1.0.
9298
sidePanelWidth: 0.3333
9399

94-
# If true, increase the height of the focused side window; creating an accordion effect.
100+
# If true, increase the height of the focused side window; creating an accordion
101+
# effect.
95102
expandFocusedSidePanel: false
96103

97104
# The weight of the expanded side panel, relative to the other panels. 2 means
98-
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
105+
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel`
106+
# is true.
99107
expandedSidePanelWeight: 2
100108

101-
# Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
109+
# Sometimes the main window is split in two (e.g. when the selected file has
110+
# both staged and unstaged changes). This setting controls how the two sections
111+
# are split.
102112
# Options are:
103113
# - 'horizontal': split the window horizontally
104114
# - 'vertical': split the window vertically
105-
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
115+
# - 'flexible': (default) split the window horizontally if the window is wide
116+
# enough, otherwise split vertically
106117
mainPanelSplitMode: flexible
107118

108-
# How the window is split when in half screen mode (i.e. after hitting '+' once).
119+
# How the window is split when in half screen mode (i.e. after hitting '+'
120+
# once).
109121
# Possible values:
110-
# - 'left': split the window horizontally (side panel on the left, main view on the right)
122+
# - 'left': split the window horizontally (side panel on the left, main view on
123+
# the right)
111124
# - 'top': split the window vertically (side panel on top, main view below)
112125
enlargedSideViewLocation: left
113126

114-
# If true, wrap lines in the staging view to the width of the view. This
115-
# makes it much easier to work with diffs that have long lines, e.g.
116-
# paragraphs of markdown text.
127+
# If true, wrap lines in the staging view to the width of the view. This makes
128+
# it much easier to work with diffs that have long lines, e.g. paragraphs of
129+
# markdown text.
117130
wrapLinesInStagingView: true
118131

119-
# If true, hunk selection mode will be enabled by default when entering the staging view.
132+
# If true, hunk selection mode will be enabled by default when entering the
133+
# staging view.
120134
useHunkModeInStagingView: true
121135

122-
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
136+
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko'
137+
# | 'ru' | 'pt'
123138
language: auto
124139

125140
# Format used when displaying time e.g. commit time.
@@ -192,11 +207,15 @@ gui:
192207
# If true, show the '5 of 20' footer at the bottom of list views
193208
showListFooter: true
194209

195-
# If true, display the files in the file views as a tree. If false, display the files as a flat list.
196-
# This can be toggled from within Lazygit with the '`' key, but that will not change the default.
210+
# If true, display the files in the file views as a tree. If false, display the
211+
# files as a flat list.
212+
# This can be toggled from within Lazygit with the '`' key, but that will not
213+
# change the default.
197214
showFileTree: true
198215

199-
# If true, add a "/" root item in the file tree representing the root of the repository. It is only added when necessary, i.e. when there is more than one item at top level.
216+
# If true, add a "/" root item in the file tree representing the root of the
217+
# repository. It is only added when necessary, i.e. when there is more than one
218+
# item at top level.
200219
showRootItemInFileTree: true
201220

202221
# If true, show the number of lines changed per file in the Files view
@@ -208,7 +227,9 @@ gui:
208227
# If true, show the command log
209228
showCommandLog: true
210229

211-
# If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.
230+
# If true, show the bottom line that contains keybinding info and useful
231+
# buttons. If false, this line will be hidden except to display a loader for an
232+
# in-progress action.
212233
showBottomLine: true
213234

214235
# If true, show jump-to-window keybindings in window titles.
@@ -219,10 +240,12 @@ gui:
219240
# If empty, do not show icons.
220241
nerdFontsVersion: ""
221242

222-
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
243+
# If true (default), file icons are shown in the file views. Only relevant if
244+
# NerdFontsVersion is not empty.
223245
showFileIcons: true
224246

225-
# Length of author name in (non-expanded) commits view. 2 means show initials only.
247+
# Length of author name in (non-expanded) commits view. 2 means show initials
248+
# only.
226249
commitAuthorShortLength: 2
227250

228251
# Length of author name in expanded commits view. 2 means show initials only.
@@ -243,18 +266,21 @@ gui:
243266

244267
# Whether to split the main window when viewing file changes.
245268
# One of: 'auto' | 'always'
246-
# If 'auto', only split the main window when a file has both staged and unstaged changes
269+
# If 'auto', only split the main window when a file has both staged and unstaged
270+
# changes
247271
splitDiff: auto
248272

249-
# Default size for focused window. Can be changed from within Lazygit with '+' and '_' (but this won't change the default).
273+
# Default size for focused window. Can be changed from within Lazygit with '+'
274+
# and '_' (but this won't change the default).
250275
# One of: 'normal' (default) | 'half' | 'full'
251276
screenMode: normal
252277

253278
# Window border style.
254279
# One of 'rounded' (default) | 'single' | 'double' | 'hidden' | 'bold'
255280
border: rounded
256281

257-
# If true, show a seriously epic explosion animation when nuking the working tree.
282+
# If true, show a seriously epic explosion animation when nuking the working
283+
# tree.
258284
animateExplosion: true
259285

260286
# Whether to stack UI components on top of each other.
@@ -287,14 +313,16 @@ gui:
287313
# If true, jump to the Files panel after applying a stash
288314
switchToFilesAfterStashApply: true
289315

290-
# If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead
316+
# If true, when using the panel jump keys (default 1 through 5) and target panel
317+
# is already active, go to next tab instead
291318
switchTabsWithPanelJumpKeys: false
292319

293320
# Config relating to git
294321
git:
295322
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
296323
paging:
297-
# Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
324+
# Value of the --color arg in the git diff command. Some pagers want this to be
325+
# set to 'always' and some want it set to 'never'
298326
colorArg: always
299327

300328
# e.g.
@@ -306,7 +334,10 @@ git:
306334
# e.g. 'difft --color=always'
307335
externalDiffCommand: ""
308336

309-
# If true, Lazygit will use git's `diff.external` config for paging. The advantage over `externalDiffCommand` is that this can be configured per file type in .gitattributes; see https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.
337+
# If true, Lazygit will use git's `diff.external` config for paging. The
338+
# advantage over `externalDiffCommand` is that this can be configured per file
339+
# type in .gitattributes; see
340+
# https://git-scm.com/docs/gitattributes#_defining_an_external_diff_driver.
310341
useExternalDiffGitConfig: false
311342

312343
# Config relating to committing
@@ -322,22 +353,26 @@ git:
322353

323354
# Config relating to merging
324355
merging:
325-
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
356+
# If true, run merges in a subprocess so that if a commit message is required,
357+
# Lazygit will not hang
326358
# Only applicable to unix users.
327359
manualCommit: false
328360

329361
# Extra args passed to `git merge`, e.g. --no-ff
330362
args: ""
331363

332-
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
364+
# The commit message to use for a squash merge commit. Can contain
365+
# "{{selectedRef}}" and "{{currentBranch}}" placeholders.
333366
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
334367

335-
# list of branches that are considered 'main' branches, used when displaying commits
368+
# list of branches that are considered 'main' branches, used when displaying
369+
# commits
336370
mainBranches:
337371
- master
338372
- main
339373

340-
# Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'
374+
# Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks
375+
# will be skipped when the commit message starts with 'WIP'
341376
skipHookPrefix: WIP
342377

343378
# If true, periodically fetch from remote
@@ -346,33 +381,40 @@ git:
346381
# If true, periodically refresh files and submodules
347382
autoRefresh: true
348383

349-
# If not "none", lazygit will automatically fast-forward local branches to match their upstream after fetching. Applies to branches that are not the currently checked out branch, and only to those that are strictly behind their upstream (as opposed to diverged).
384+
# If not "none", lazygit will automatically fast-forward local branches to match
385+
# their upstream after fetching. Applies to branches that are not the currently
386+
# checked out branch, and only to those that are strictly behind their upstream
387+
# (as opposed to diverged).
350388
# Possible values: 'none' | 'onlyMainBranches' | 'allBranches'
351389
autoForwardBranches: onlyMainBranches
352390

353391
# If true, pass the --all arg to git fetch
354392
fetchAll: true
355393

356394
# If true, lazygit will automatically stage files that used to have merge
357-
# conflicts but no longer do; and it will also ask you if you want to
358-
# continue a merge or rebase if you've resolved all conflicts. If false, it
359-
# won't do either of these things.
395+
# conflicts but no longer do; and it will also ask you if you want to continue a
396+
# merge or rebase if you've resolved all conflicts. If false, it won't do either
397+
# of these things.
360398
autoStageResolvedConflicts: true
361399

362400
# Command used when displaying the current branch git log in the main window
363401
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
364402

365-
# Commands used to display git log of all branches in the main window, they will be cycled in order of appearance (array of strings)
403+
# Commands used to display git log of all branches in the main window, they will
404+
# be cycled in order of appearance (array of strings)
366405
allBranchesLogCmds:
367406
- git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
368407

369-
# 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>`.
408+
# If true, git diffs are rendered with the `--ignore-all-space` flag, which
409+
# ignores whitespace changes. Can be toggled from within Lazygit with `<c-w>`.
370410
ignoreWhitespaceInDiffView: false
371411

372-
# The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the `{` and `}` keys.
412+
# The number of lines of context to show around each diff hunk. Can be changed
413+
# from within Lazygit with the `{` and `}` keys.
373414
diffContextSize: 3
374415

375-
# The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the `(` and `)` keys.
416+
# The threshold for considering a file to be renamed, in percent. Can be changed
417+
# from within Lazygit with the `(` and `)` keys.
376418
renameSimilarityThreshold: 50
377419

378420
# If true, do not spawn a separate process when using GPG
@@ -400,30 +442,35 @@ git:
400442
# 'topo-order' makes it easier to read the git log graph, but commits may not
401443
# appear chronologically. See https://git-scm.com/docs/
402444
#
403-
# Can be changed from within Lazygit with `Log menu -> Commit sort order` (`<c-l>` in the commits window by default).
445+
# Can be changed from within Lazygit with `Log menu -> Commit sort order`
446+
# (`<c-l>` in the commits window by default).
404447
order: topo-order
405448

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

412-
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
456+
# displays the whole git graph by default in the commits view (equivalent to
457+
# passing the `--all` argument to `git log`)
413458
showWholeGraph: false
414459

415460
# How branches are sorted in the local branches view.
416461
# One of: 'date' (default) | 'recency' | 'alphabetical'
417-
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the branches panel.
462+
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the
463+
# branches panel.
418464
localBranchSortOrder: date
419465

420466
# How branches are sorted in the remote branches view.
421467
# One of: 'date' (default) | 'alphabetical'
422-
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.
468+
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the
469+
# remote branches panel.
423470
remoteBranchSortOrder: date
424471

425-
# When copying commit hashes to the clipboard, truncate them to this
426-
# length. Set to 40 to disable truncation.
472+
# When copying commit hashes to the clipboard, truncate them to this length. Set
473+
# to 40 to disable truncation.
427474
truncateCopiedCommitHashesTo: 12
428475

429476
# Periodic update checks
@@ -447,10 +494,12 @@ refresher:
447494
# If true, show a confirmation popup before quitting Lazygit
448495
confirmOnQuit: false
449496

450-
# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close
497+
# If true, exit Lazygit when the user presses escape in a context where there is
498+
# nothing to cancel/close
451499
quitOnTopLevelReturn: false
452500

453-
# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc
501+
# Config relating to things outside of Lazygit like how files are opened,
502+
# copying to clipboard, etc
454503
os:
455504
# Command for editing a file. Should contain "{{filename}}".
456505
edit: ""
@@ -459,8 +508,8 @@ os:
459508
# "{{filename}}", and may optionally contain "{{line}}".
460509
editAtLine: ""
461510

462-
# Same as EditAtLine, except that the command needs to wait until the
463-
# window is closed.
511+
# Same as EditAtLine, except that the command needs to wait until the window is
512+
# closed.
464513
editAtLineAndWait: ""
465514

466515
# Whether lazygit suspends until an edit process returns
@@ -469,12 +518,12 @@ os:
469518
# For opening a directory in an editor
470519
openDirInEditor: ""
471520

472-
# A built-in preset that sets all of the above settings. Supported presets
473-
# are defined in the getPreset function in editor_presets.go.
521+
# A built-in preset that sets all of the above settings. Supported presets are
522+
# defined in the getPreset function in editor_presets.go.
474523
editPreset: ""
475524

476-
# Command for opening a file, as if the file is double-clicked. Should
477-
# contain "{{filename}}", but doesn't support "{{line}}".
525+
# Command for opening a file, as if the file is double-clicked. Should contain
526+
# "{{filename}}", but doesn't support "{{line}}".
478527
open: ""
479528

480529
# Command for opening a link. Should contain "{{link}}".
@@ -488,7 +537,9 @@ os:
488537
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
489538
readFromClipboardCmd: ""
490539

491-
# A shell startup file containing shell aliases or shell functions. This will be sourced before running any shell commands, so that shell functions are available in the `:` command prompt or even in custom commands.
540+
# A shell startup file containing shell aliases or shell functions. This will be
541+
# sourced before running any shell commands, so that shell functions are
542+
# available in the `:` command prompt or even in custom commands.
492543
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands
493544
shellFunctionsFile: ""
494545

@@ -503,13 +554,15 @@ customCommands: []
503554
services: {}
504555

505556
# What to do when opening Lazygit outside of a git repo.
506-
# - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo
557+
# - 'prompt': (default) ask whether to initialize a new repo or open in the most
558+
# recent repo
507559
# - 'create': initialize a new repo
508560
# - 'skip': open most recent repo
509561
# - 'quit': exit Lazygit
510562
notARepository: prompt
511563

512-
# If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit.
564+
# If true, display a confirmation when subprocess terminates. This allows you to
565+
# view the output of the subprocess before returning to Lazygit.
513566
promptToReturnFromSubprocess: true
514567

515568
# Keybindings

0 commit comments

Comments
 (0)