git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] be more vim-ish, and also syntax hilight Signed-off-by lines.
@ 2006-10-17  0:31 Pierre Habouzit
  2006-10-17  0:31 ` [PATCH] nice ftplugin for vim, that shows the commited diff in a split'ed buffer Pierre Habouzit
  2006-10-17  7:46 ` [PATCH] be more vim-ish, and also syntax hilight Signed-off-by lines Junio C Hamano
  0 siblings, 2 replies; 23+ messages in thread
From: Pierre Habouzit @ 2006-10-17  0:31 UTC (permalink / raw)
  To: git; +Cc: Pierre Habouzit

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 contrib/vim/syntax/gitcommit.vim |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/contrib/vim/syntax/gitcommit.vim b/contrib/vim/syntax/gitcommit.vim
index a9de09f..d0c6e5d 100644
--- a/contrib/vim/syntax/gitcommit.vim
+++ b/contrib/vim/syntax/gitcommit.vim
@@ -1,3 +1,14 @@
+" Vim syntax file
+" Language:	git commit message
+
+" Quit when a (custom) syntax file was already loaded
+if exists("b:current_syntax")
+  finish
+endif
+
+syn region gitSignedOff start=/^Signed-off-by:/ end=/$/ contains=gitAuthor,gitEmail
+syn region gitAuthor contained start=/\s/ end=/$/
+
 syn region gitLine start=/^#/ end=/$/
 syn region gitCommit start=/^# Updated but not checked in:$/ end=/^#$/ contains=gitHead,gitCommitFile
 syn region gitHead contained start=/^#   (.*)/ end=/^#$/
@@ -8,6 +19,9 @@ syn match gitCommitFile contained /^#\t.
 syn match gitChangedFile contained /^#\t.*/hs=s+2
 syn match gitUntrackedFile contained /^#\t.*/hs=s+2
 
+hi def link gitSignedOff Keyword
+hi def link gitAuthor Normal
+
 hi def link gitLine Comment
 hi def link gitCommit Comment
 hi def link gitChanged Comment
@@ -16,3 +30,7 @@ hi def link gitUntracked Comment
 hi def link gitCommitFile Type
 hi def link gitChangedFile Constant
 hi def link gitUntrackedFile Constant
+
+let b:current_syntax = "git"
+
+" vim: ts=8 sw=2
-- 
1.4.2.3

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2006-10-18  9:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-17  0:31 [PATCH] be more vim-ish, and also syntax hilight Signed-off-by lines Pierre Habouzit
2006-10-17  0:31 ` [PATCH] nice ftplugin for vim, that shows the commited diff in a split'ed buffer Pierre Habouzit
2006-10-17  8:22   ` Peter Baumann
2006-10-17 10:38     ` Pierre Habouzit
2006-10-17 10:59       ` Peter Baumann
2006-10-17 11:04         ` Pierre Habouzit
2006-10-17 21:48           ` Christian MICHON
2006-10-17 22:04             ` Junio C Hamano
2006-10-18  1:57             ` Petr Baudis
2006-10-17  7:46 ` [PATCH] be more vim-ish, and also syntax hilight Signed-off-by lines Junio C Hamano
2006-10-18  0:38   ` contrib/vim patches, replace the previous set Pierre Habouzit
2006-10-18  0:39   ` Pierre Habouzit
2006-10-18  0:39     ` [PATCH] be more vim-ish, and also syntax hilight Signed-off-by lines Pierre Habouzit
2006-10-18  0:39       ` [PATCH] Nice ftplugin for vim, that shows the commited diff in a split'ed buffer Pierre Habouzit
2006-10-18  0:40         ` Pierre Habouzit
2006-10-18  0:47       ` Make the ftplugin right wrt gitdir Pierre Habouzit
2006-10-18  0:47         ` [PATCH] be more robust wrt the git-dir Pierre Habouzit
2006-10-18  7:02         ` Make the ftplugin right wrt gitdir Jeff King
2006-10-18  8:10           ` Pierre Habouzit
2006-10-18  9:02             ` Jeff King
2006-10-18  9:07               ` Pierre Habouzit
2006-10-18  9:46                 ` Jeff King
2006-10-18  6:59       ` [PATCH] be more vim-ish, and also syntax hilight Signed-off-by lines Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).