Skip to content

Commit 8a40e8c

Browse files
CBenoitjdrst
authored andcommitted
Add good default rulers when editing git messages (helix-editor#3738)
Around 50 columns for the summary is good because it is often used as heading or as subject in emails. 72 columns for the body is generally good because some tools do not wrap long lines (`git log` with pager `less` is a good example). Helix's `:reflow` command is really good to help with the second point. Linux kernel documentation says: > For these reasons, the ``summary`` must be no more than 70-75 > characters, and it must describe both what the patch changes, as well > as why the patch might be necessary. It is challenging to be both > succinct and descriptive, but that is what a well-written summary > should do. Source: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n627 tpope: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html Commit message style guide for Git: https://commit.style/
1 parent c142687 commit 8a40e8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

languages.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,8 @@ roots = []
972972
file-types = ["COMMIT_EDITMSG"]
973973
comment-token = "#"
974974
indent = { tab-width = 2, unit = " " }
975+
rulers = [50, 72]
976+
max-line-length = 72
975977

976978
[[grammar]]
977979
name = "git-commit"

0 commit comments

Comments
 (0)