martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.21k stars 258 forks source link

filetype: Add COMMIT_EDITMSG to diff. #936

Closed parazyd closed 3 years ago

parazyd commented 3 years ago

This is useful when writing a commit message in git.

martanne commented 3 years ago

Why do you think this is useful? You will have to motivate your changes. Do you typically have diffs in your commit messages?

Also we already have a section for COMMIT_EDITMSG which sets the column marker to indicate when the commit message is too long. In fact, a proper commit message lexer could ensure that other commit message conventions (e.g. shorter subject line, empty second line etc.) are respected.

parazyd commented 3 years ago

If you have git.commit.verbose set to true, then it shows you the entire commit in your $EDITOR. So this is where the diff can be colored.