2008-09-29 22:08:14 +02:00
|
|
|
Syntax highlighting for git commit messages, config files, etc. is
|
|
|
|
included with the vim distribution as of vim 7.2, and should work
|
|
|
|
automatically.
|
|
|
|
|
|
|
|
If you have an older version of vim, you can get the latest syntax
|
|
|
|
files from the vim project:
|
|
|
|
|
2009-01-13 03:10:26 +01:00
|
|
|
http://ftp.vim.org/pub/vim/runtime/syntax/git.vim
|
|
|
|
http://ftp.vim.org/pub/vim/runtime/syntax/gitcommit.vim
|
|
|
|
http://ftp.vim.org/pub/vim/runtime/syntax/gitconfig.vim
|
|
|
|
http://ftp.vim.org/pub/vim/runtime/syntax/gitrebase.vim
|
|
|
|
http://ftp.vim.org/pub/vim/runtime/syntax/gitsendemail.vim
|
|
|
|
|
|
|
|
These files are also available via FTP at the same location.
|
2008-09-29 22:08:14 +02:00
|
|
|
|
|
|
|
To install:
|
|
|
|
|
|
|
|
1. Copy these files to vim's syntax directory $HOME/.vim/syntax
|
|
|
|
2. To auto-detect the editing of various git-related filetypes:
|
2013-01-10 21:54:27 +01:00
|
|
|
|
|
|
|
$ curl http://ftp.vim.org/pub/vim/runtime/filetype.vim |
|
|
|
|
sed -ne '/^" Git$/, /^$/ p' >>$HOME/.vim/filetype.vim
|