Re: [PATCH] be more vim-ish, and also syntax hilight Signed-off-by lines.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 18, 2006 at 02:39:35AM +0200, Pierre Habouzit wrote:

> +if exists("b:current_syntax")
> +  finish
> +endif

I think this is a good change (along with commenting), but please write
a more descriptive commit message than "be more vim-ish" (I wouldn't
mind seeing this and the highlighting change broken into two patches,
since they are functionally completely unrelated).

> +syn region gitSignedOff start=/^Signed-off-by:/ end=/$/ contains=gitAuthor,gitEmail
> +syn region gitAuthor contained start=/\s/ end=/$/

You mention gitEmail but never define it. Are people using other things
besides Signed-off-by? I think we might do better to simply write:
  syn region gitCommentHeader start=/^[^ ]\+:/ end=/$/ contains=gitCommentValue
  syn region gitCommentValue contained start=/\s/ end=/$/

Highlighting only the header is inconsistent with other highlighting
(e.g., all of "new file: foo" is highlighted), but it looks so ugly to
highlight the whole line, so I think this is fine.

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]