From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [PATCH] vim syntax: highlight the diff in commit message template Date: Wed, 24 Sep 2008 11:57:45 -0400 Message-ID: <20080924155745.GA3908@coredump.intra.peff.net> References: <1222269726-15632-1-git-send-email-szeder@ira.uka.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Junio C Hamano , git@vger.kernel.org To: SZEDER =?utf-8?B?R8OhYm9y?= X-From: git-owner@vger.kernel.org Wed Sep 24 17:59:14 2008 connect(): Connection refused Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1KiWll-0004EX-RA for gcvg-git-2@gmane.org; Wed, 24 Sep 2008 17:59:14 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752311AbYIXP5t convert rfc822-to-quoted-printable (ORCPT ); Wed, 24 Sep 2008 11:57:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752189AbYIXP5t (ORCPT ); Wed, 24 Sep 2008 11:57:49 -0400 Received: from peff.net ([208.65.91.99]:2193 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752118AbYIXP5s (ORCPT ); Wed, 24 Sep 2008 11:57:48 -0400 Received: (qmail 22122 invoked by uid 111); 24 Sep 2008 15:57:46 -0000 Received: from coredump.intra.peff.net (HELO coredump.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.32) with SMTP; Wed, 24 Sep 2008 11:57:46 -0400 Received: by coredump.intra.peff.net (sSMTP sendmail emulation); Wed, 24 Sep 2008 11:57:45 -0400 Content-Disposition: inline In-Reply-To: <1222269726-15632-1-git-send-email-szeder@ira.uka.de> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Wed, Sep 24, 2008 at 05:22:06PM +0200, SZEDER G=C3=A1bor 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 clueles= s 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=3D/\%(^diff --git \)\@=3D/ end=3D/^$\|= ^#\@=3D/ contains=3D@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 of= f 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