Tuesday 17 October 2006
vim mode for git commits
Par MadCoder, Tuesday 17 October 2006 à 02:00 :: Geeky
That's threefold:
- a syntax file ~/.vim/syntax/git.vim
- a ftplugin file ~/.vim/ftplugin/git.vim
- and add a line in your ~/.vim/filetype.vim that says
au BufRead,BufNewFile COMMIT_EDITMSG setf git
Now you will have a quite simple syntax colorization for the commit log, and the killer feature is that when you git commit, a vertical split shows the diff while you are commenting it :)
I suppose those modes will evolve, please enjoy.
Edit: the script was a bit modified to work even when you're not in autochdir mode, thanks to SungHyun Nam from the git-list.
