Using Git, my editor for commits is Vim. I'm constantly doing a poor job of remembering to wrap lines and so I get long lines (see this answer for example). Is there a way using some git config
or .vimrc
magic that I can get Vim to automatically wrap lines at 72 columns?
Add this to your .vimrc
:
au FileType gitcommit setlocal tw=72