Write good git commit messages

3 Points

Florian Beer Florian Beer

9 years ago

Spell checking and automatic wrapping at the recommended 72 columns for git commit messages.

autocmd Filetype gitcommit setlocal spell textwidth=72

Anton Backer

Anton Backer 9 years ago

textwidth=72 is already a default for me. It's defined in /usr/share/vim/vim*/ftplugin/gitcommit.vim

Jakub Miziołek

Jakub Miziołek 9 years ago

With fugitive.vim installed you have even more commit formatting help. It ensures first line is s short title up to 50 chars then you leave one blank line. And you have textwidth=72 on following lines.