From cdad8bbe92a447233133be8f9f3015c1bd7e10eb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 11 Sep 2006 19:22:49 -0400 Subject: contrib/vim: add syntax highlighting file for commits Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- contrib/vim/syntax/gitcommit.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 contrib/vim/syntax/gitcommit.vim (limited to 'contrib/vim/syntax/gitcommit.vim') diff --git a/contrib/vim/syntax/gitcommit.vim b/contrib/vim/syntax/gitcommit.vim new file mode 100644 index 0000000000..a9de09fa2f --- /dev/null +++ b/contrib/vim/syntax/gitcommit.vim @@ -0,0 +1,18 @@ +syn region gitLine start=/^#/ end=/$/ +syn region gitCommit start=/^# Updated but not checked in:$/ end=/^#$/ contains=gitHead,gitCommitFile +syn region gitHead contained start=/^# (.*)/ end=/^#$/ +syn region gitChanged start=/^# Changed but not updated:/ end=/^#$/ contains=gitHead,gitChangedFile +syn region gitUntracked start=/^# Untracked files:/ end=/^#$/ contains=gitHead,gitUntrackedFile + +syn match gitCommitFile contained /^#\t.*/hs=s+2 +syn match gitChangedFile contained /^#\t.*/hs=s+2 +syn match gitUntrackedFile contained /^#\t.*/hs=s+2 + +hi def link gitLine Comment +hi def link gitCommit Comment +hi def link gitChanged Comment +hi def link gitHead Comment +hi def link gitUntracked Comment +hi def link gitCommitFile Type +hi def link gitChangedFile Constant +hi def link gitUntrackedFile Constant -- cgit v1.2.3