Introduce the diff option '--patience'
[git/spearce.git] / contrib / vim / README
blobc487346eba0f4ecad01903ccc68963040d9944ab
1 Syntax highlighting for git commit messages, config files, etc. is
2 included with the vim distribution as of vim 7.2, and should work
3 automatically.
5 If you have an older version of vim, you can get the latest syntax
6 files from the vim project:
8   http://vim.svn.sourceforge.net/viewvc/vim/trunk/runtime/syntax/git.vim
9   http://vim.svn.sourceforge.net/viewvc/vim/trunk/runtime/syntax/gitcommit.vim
10   http://vim.svn.sourceforge.net/viewvc/vim/trunk/runtime/syntax/gitconfig.vim
11   http://vim.svn.sourceforge.net/viewvc/vim/trunk/runtime/syntax/gitrebase.vim
12   http://vim.svn.sourceforge.net/viewvc/vim/trunk/runtime/syntax/gitsendemail.vim
14 To install:
16   1. Copy these files to vim's syntax directory $HOME/.vim/syntax
17   2. To auto-detect the editing of various git-related filetypes:
18         $ cat >>$HOME/.vim/filetype.vim <<'EOF'
19         autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG    setf gitcommit
20         autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
21         autocmd BufNewFile,BufRead git-rebase-todo         setf gitrebase
22         autocmd BufNewFile,BufRead .msg.[0-9]*
23                 \ if getline(1) =~ '^From.*# This line is ignored.$' |
24                 \   setf gitsendemail |
25                 \ endif
26         autocmd BufNewFile,BufRead *.git/**
27                 \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
28                 \   setf git |
29                 \ endif
30         EOF