What is the parameter to configure the color of the first line (and the body text) of the commit message editor of git? (In case that matters, I am using vim as an editor).
I have found many related resources, but none of them gave the option to specify this color. (For the records, the most relevant hits were the following:
I am beginning to suspect that this option has to be configured somewhere else (e.g. in bash or in vim)...
To change the color of the title when you are editing the commit message in vim, add following code to ~/.vimrc
au FileType gitcommit
\ hi gitcommitSummary ctermfg=yellow ctermbg=red
other highlight option can be found by typing :hi
in vim command, or from following url
https://github.com/vim/vim/blob/master/runtime/syntax/gitcommit.vim
As the syntax script for the gitcommit
filetype properly uses :hi def link
, you can simply overwrite any of its highlightings in your ~/.vimrc
:
:hi gitcommitSummary ctermfg=yellow ctermbg=red
No :au FileType gitcommit
(as in @ymonad's answer) is necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With