-
-
Couldn't load subscription status.
- Fork 2.3k
Added row length in commit description title #3117
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
Added row length in commit description title #3117
Conversation
|
Nice. I like the simplicity of this approach; on the other hand, I have concerns whether this is useful enough. A few observations:
|
|
I don't know, all in all I feel I want a better way to solve this, one that requires less manual rewrapping work. I just had a look at Thunderbird's message composition window again, and I feel that it solves this problem in a very elegant way. It just rewraps paragraphs automatically as I type, this is exactly what I want. Here's a video: Screen.Recording.Thunderbird.mp4Yes, I know that in the past I argued against automatic rewrapping, but that was in response to a rewrap command that you invoke. I feel this is dangerous as long as we don't have undo in our editor. However, the fully automatic as-you-type rewrapping seems really perfect to me, and I can't imagine a lot of situations where it would do something I don't want. (One such case might be if I want to insert a long http link and I don't want it to be broken; but I can always type Now, I haven't thought much about how this could be implemented, or how hard that would be. I feel we'd need a change to gocui, but I'm not sure. In any case we'd need a way to distinguish hard line breaks from "soft" ones, somehow. Anybody up for giving this a try? |
|
I think the changes you're suggesting would need to be in gocui, yes. It should be fairly straightforward to do, a fun challenge to make it efficient enough even on long messages. I think the biggest issue would be how to signal to the users what it is and how to configure it. If it's on by default, it would be quite intrusive to the users (but perhaps a welcomed change? I would think so) and if it's not, it would very difficult to know it's even a feature. This PR's indicator is intended to be a middleground. For the ones who doesn't care much about row length: it won't be in the way. And for the ones who do: they can see how long each row is, and then themselves decide where to break it, or perhaps decide to edit it in an editor. It's the agnosticism which is the strength though: anyone can decide their own limts. I added fixed padding, up to 3 digits. |
I haven't seen this as a problem so far. I have been including #3173 in custom builds that I distribute to colleagues at work for a while now, and observed some of them use it for the first time. There's usually a brief moment of surprise when they see the auto-wrapping for the first time, and from then on it's totally intuitive.
I do; once we have auto-wrapping (and I really want #3173 to get merged), we don't need the row length indication any more, and it's just unnecessary visual noise. I'd vote for closing this PR in that case. |
|
Sounds good to me! Feel free to close this when #3173 gets merged. |
Simple but effective implementation which allows the users to see the amount of characters for each row. PR is stemming from discussions on how to encourage/enforce git best practices here and here.
I think this can be a good start towards providing further aid for the users to break their rows at a reasonable limits.
go generate ./...)docs/Config.md) have been updated if necessary