I am in windows and do not want to set autocrlf
to true
. I worked on the problem by putting the following in my .vimrc
" settings for git commit messages function GitCommitSettings() %s/^M//g " remove ^M added by git diff syntax sync fromstart " refresh syntax highlight after replace 1 " move to line 1 endfunction au BufNewFile,BufRead COMMIT_EDITMSG call GitCommitSettings()
source share