The other day at work I thought, “Why can’t vim automatically wrap my git commit messages?” It turns out it can! And doing this will fix it for both vim in your terminal and vim in the Integrated Terminal of VS Code.
- Locate your
.vimrc
by runningvim --version
and looking foruser vimrc file
- Add
filetype indent plugin on
to your.vimrc
file - Restart vim/zsh/VSCode
And that’s it! Now your git commit messages will automatically wrap when they get too long!