-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git Commit Message Wraps lines at 50 characters instead of 72 #395
Comments
I was able to work around this issue by making the 50 character ruler secondary with this config: "[git-commit]": {
"editor.rulers": [72, 50],
"editor.wordWrap": "on"
}, The default is |
Would love for rewrap to handle this itself! Def hit me for a while before I realized this was the problem and even then spent a lot of time googling to realize it was the commit title vs summary. Or maybe we (I?) should make a ticket against vscode for the ruler length swap? |
Oh, you know, that workaround isn't consistent. If you tell Rewrap to run when the line is between 50 and 72 characters, it wraps at the 50 character limit. It only wraps at the 72 character limit when the line is longer then 72 characters. I suspect Rewrap will have to learn a bit more about what mode its in? I know that's a gross hack, but I'm not sure what else to do Or just always pick the longest? |
Would be nice if the VSCode rulers had an API to tell you which context you were in… |
As a workaround, this seems to work just fine, it just duplicates information that's already configured in the ruler setting: "[git-commit]": {
"rewrap.wrappingColumn": 72
}, Having |
[Moving from microsoft/vscode#206480]
Since at least VScode v1.86.1,
Git Commit Message
mode has two wrap columns: 50 characters for the subject line (the first lone line of the buffer), and 72 characters for the body (all other lines). When using rewrap, it wraps body lines at 50 characters instead of 72. This GIF illustrates the issue:I presume this is because the 50 character wrap column comes first, so is the default choice for rewrap. But the 72 wrap column is the more important one for Git commit messages, since the subject line is only a single line, but the body can be quite long.
VS Code version: Code 1.87.0 (Universal) (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:42:56.944Z)
OS version: Darwin arm64 23.3.0
The text was updated successfully, but these errors were encountered: