Skip to content
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

Feature: check user's commit message length #86

Closed
scps950707 opened this issue May 22, 2016 · 9 comments
Closed

Feature: check user's commit message length #86

scps950707 opened this issue May 22, 2016 · 9 comments

Comments

@scps950707
Copy link
Contributor

scps950707 commented May 22, 2016

_003
vim changes the color of commit message text color to tell us not to write commit message longer than 50 characters in first line.
But magit doesn't
magit ---home-scps950707-github-gittest - vim_004
I hope vimagit can implement same feature as vim, thanks!

@scps950707
Copy link
Contributor Author

scps950707 commented Jul 1, 2016

I resolve this problem by intergrating this plugin:vim-lengthmatters with vimagit
Then I Add

autocmd User VimagitEnterCommit let g:lengthmatters_magit_mode=1|:LengthmattersReload

to my vimrc and works
_006

@jreybert
Copy link
Owner

jreybert commented Jul 5, 2016

Great, thanks for the tip!

@scps950707
Copy link
Contributor Author

I also have another solution by just Modify vimagit's syntax rule to do the same feaure
this commit
And now works like this
_002

@jreybert
Copy link
Owner

jreybert commented Jul 5, 2016

Nice trick. But there are solutions to detect the first non blank line in a commit message, without adding a string in front of the line. A PR with such solution would be welcomed.

@scps950707
Copy link
Contributor Author

Hmm..I think it's a little bit diffcult, I can't figure out this regex mattern to match first non blank line in a commit message

@jreybert
Copy link
Owner

jreybert commented Jul 6, 2016

Indeed, the pattern is the following: the first non blank line after the pattern "Commit message\n==============\n"

@Bob131
Copy link

Bob131 commented Jul 18, 2016

Since this isn't supported in vimagit itself, can this issue be reopened?

@scps950707
Copy link
Contributor Author

OK ,I reopen it.

@scps950707 scps950707 reopened this Jul 18, 2016
scps950707 added a commit to scps950707/vimagit that referenced this issue Feb 8, 2017
scps950707 added a commit to scps950707/vimagit that referenced this issue Feb 8, 2017
@jreybert
Copy link
Owner

👍 thanks @scps950707 for the PR! It has been merged in next and will be soon merged in master

@jreybert jreybert added this to the Release 1.7.0 milestone Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants