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.

  1. Locate your .vimrc by running vim --version and looking for user vimrc file
  2. Add filetype indent plugin on to your .vimrc file
  3. Restart vim/zsh/VSCode

And that’s it! Now your git commit messages will automatically wrap when they get too long!