1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-09 02:33:11 +01:00
git/contrib/vim
Jonathan Nieder 9a6dcb37bd contrib/vim: simplify instructions for old vim support
Rely on the upstream filetype.vim instead of duplicating its rules in
git's instructions for syntax highlighting support on pre-7.2 vim
versions.

The result is a shorter contrib/vim/README.  More importantly, it lets
us punt on maintenance of the autocmd rules.

So now when we fix the upstream gitsendemail rule in light of commit
eed6ca7, new git users stuck on old vim reading contrib/vim/README can
automagically get the fix without any further changes needed to git.

Once the world has moved on to vim 7.2+ completely, we can get rid of
these instructions, but for now if they are this simple it's
effortless to keep them.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-10 14:58:54 -08:00
..
README contrib/vim: simplify instructions for old vim support 2013-01-10 14:58:54 -08: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:

  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.

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:

	$ curl http://ftp.vim.org/pub/vim/runtime/filetype.vim |
		sed -ne '/^" Git$/, /^$/ p' >>$HOME/.vim/filetype.vim