Re: [PATCH] vim syntax: highlight the diff in commit message template

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

 



On Wed, Sep 24, 2008 at 05:22:06PM +0200, SZEDER Gábor wrote:

> The template generated by 'git commit -v' is much easier to read now.

I think the goal of this change is good, but I'm not sure about the
implementation:

> +source $VIMRUNTIME/syntax/diff.vim

Despite having written the original gitcommit.vim, I am largely clueless
about vim syntax highlighting. However, the gitcommit.vim shipped with
vim 7.2 does this:

  syn include @gitcommitDiff syntax/diff.vim
  syn region gitcommitDiff start=/\%(^diff --git \)\@=/ end=/^$\|^#\@=/ contains=@gitcommitDiff

which seems a bit more robust to me. I have no idea if that syntax
introduces any limitations about which versions of vim can be used.

However, this brings up a more important question: is there any reason
for git to ship a vim syntax file when there is already a maintained
(and IMHO, much superior) one that ships with vim? The only people who
should need our file are people on versions of vim older than the ones
that ship gitcommit.vim. For those people, I suspect they are better off
going to vim.org and grabbing the up to date (and undoubtedly more
carefully constructed) syntax file rather than pulling what is in our
contrib/ area.

Is there any objection to simply removing it (and probably replacing it
with a note to go look at the official highlighting file)?

-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]

  Powered by Linux