Git commit basics: line wrapping and 50/72 rule #26945
AlexDaniel
started this conversation in
Git
Replies: 2 comments 3 replies
-
In case somebody is coming back to this thread to see if there's any progress, check this: #26346 (comment) I'm now pretty happy using Zed as |
Beta Was this translation helpful? Give feedback.
1 reply
-
It would be nice to also have rulers or a counter in the new Git Panel. I'm currently simulating it by making it just wide enough to wrap on 72 characters, but then I can't read paths in the stage view if they are long. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Zed should help writing commit messages that follow these rules:
This is discussed in many places around the internet, some examples:
Emacs magit does this by default:

Notice how:
One “soft” way to allow this is to enable wrap guides in the commit messages (this doesn't work right now). The config might look like this:
This way, the user will be able to set the guides themselves if they want to. However, I'd recommend highlighting the “wrong” parts of the commit message in red by default, as this is a relatively widespread convention which the user can bypass if they want to.
Note that, currently, writing a message that follows these rules is quite difficult in zed. The editor doesn't even show the cursor position or any other indication of how long your lines are. This forces me to write the commit outside of zed (somewhere where you can at least see how long your lines are), which is rather unfortunate.
Beta Was this translation helpful? Give feedback.
All reactions