From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: about vim contrib support Date: Thu, 10 Jan 2013 06:39:58 -0500 Message-ID: <20130110113958.GA17137@sigill.intra.peff.net> References: <50EEA34B.7070102@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: "git@vger.kernel.org" To: Manlio Perillo X-From: git-owner@vger.kernel.org Thu Jan 10 12:40:35 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TtGUl-0007B9-Gi for gcvg-git-2@plane.gmane.org; Thu, 10 Jan 2013 12:40:27 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541Ab3AJLkD (ORCPT ); Thu, 10 Jan 2013 06:40:03 -0500 Received: from 75-15-5-89.uvs.iplsin.sbcglobal.net ([75.15.5.89]:53491 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734Ab3AJLkB (ORCPT ); Thu, 10 Jan 2013 06:40:01 -0500 Received: (qmail 7491 invoked by uid 107); 10 Jan 2013 11:41:16 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Thu, 10 Jan 2013 06:41:15 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Thu, 10 Jan 2013 06:39:58 -0500 Content-Disposition: inline In-Reply-To: <50EEA34B.7070102@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Jan 10, 2013 at 12:17:31PM +0100, Manlio Perillo wrote: > In the contrib/vim/README file there are instructions about how to setup > git support with Vim builtin git syntax files. > > However these instructions seems to be redundant, since the system > filetype.vim file already have the autocmd rules. What version of vim do you have? As the README says, version 7.2 and on come with the files already, and you do not need to do anything. If you have an older version that does not ship with them, and you are pulling them down directly from the URLs provided, then your vim probably does not already have them in its stock filetype.vim. > The only issue I found is with: > > autocmd BufNewFile,BufRead .msg.[0-9]* > \ if getline(1) =~ '^From.*# This line is ignored.$' | > \ setf gitsendemail | > \ endif > > It should be: > > autocmd BufNewFile,BufRead [0-9]*.patch It looks like .msg.[0-9] was originally used for send-email cover letters, and was changed to .gitsendemail.msg.* by commit eed6ca7. I think your [0-9]*.patch would match something else entirely (though it is still broken, of course, as .msg.* does not exist anymore). I'd argue that we should just remove contrib/vim at this point. It has no actual files in it, only pointers to vim.org for pre-7.2 vim users. And that version was released in 2008, so the README is helping almost nobody at this point (if you are on an ancient platform, and are an avid enough vim user to download the syntax files, I suspect you would simply install a newer version of vim). > IMHO it should contain some other checks, to make sure it is a patch > generated by git format-patch, and not, as an example, a plain patch or > a Mercurial patch. > > By the way: I don't understand the purpose of gitsendemail syntax. > On my system it does not highlight the diff. As far as I can tell, it is for cover letters, not for patches. Patches should already be handled by existing RFC822-message highlighting. -Peff