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
I noticed that this mode highlights any portion of the first line that exceeds the recommended 50-character limit. A 72-character limit seems to be a common convention for the rest of the commit message [1]. Do you think it would be a good idea to codify this convention too?
auto-fill-mode makes it very easy to arrange paragraphs with line breaks near a certain column. Just press press M-q and the current paragraph will be reflowed. My first proposal is to set the fill-column variable to 72 when git-commit-mode is activated. This could be as simple as calling (setq fill-column 72), but since I'm pretty new at elisp I don't know the preferred way to set this on mode entry (preferably only in the commit message buffer).
My other proposal is to turn on auto-fill-mode automatically. In my experience the great majority of commit message lines are ordinary text, which should adhere to the 72-character rule. I think it makes sense to have it activated by default. What do you think?
I did some thinkering and found out that (setq fill-column 72) does indeed only set the value buffer-locally. (The C-h v fill-column help was really useful.)
First, thanks for a great mode! I really like it.
I noticed that this mode highlights any portion of the first line that exceeds the recommended 50-character limit. A 72-character limit seems to be a common convention for the rest of the commit message [1]. Do you think it would be a good idea to codify this convention too?
auto-fill-mode
makes it very easy to arrange paragraphs with line breaks near a certain column. Just press pressM-q
and the current paragraph will be reflowed. My first proposal is to set thefill-column
variable to 72 whengit-commit-mode
is activated. This could be as simple as calling(setq fill-column 72)
, but since I'm pretty new at elisp I don't know the preferred way to set this on mode entry (preferably only in the commit message buffer).My other proposal is to turn on
auto-fill-mode
automatically. In my experience the great majority of commit message lines are ordinary text, which should adhere to the 72-character rule. I think it makes sense to have it activated by default. What do you think?References:
[1] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
The text was updated successfully, but these errors were encountered: