git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: Michael Wookey <michaelwookey@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Extremely simple Vim interface for Git
Date: Sun, 7 Sep 2008 16:13:56 +0300	[thread overview]
Message-ID: <20080907131356.GC3387@mithlond.arda.local> (raw)
In-Reply-To: <d2e97e800809070332t35e4ed46u7af4653ea768b39b@mail.gmail.com>

Michael Wookey wrote (2008-09-07 20:32 +1000):

> If you alter the RunShellCommand() function to the following -

>       if stridx(a:cmdline, "diff") > 0
>           set filetype=diff
>       endif

> Then Vim will apply diff syntax highlighting to the scratch buffer
> when a "diff" command is executed.

Good idea. I implemented the same thing this way:

    if match(a:cmdline,'\v^(git|hg|svn|bzr) diff') >= 0
        setlocal filetype=diff
    endif

  reply	other threads:[~2008-09-07 13:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 19:37 Extremely simple Vim interface for Git Teemu Likonen
2008-09-07 10:32 ` Michael Wookey
2008-09-07 13:13   ` Teemu Likonen [this message]
2008-09-07 17:46     ` Teemu Likonen
2008-09-07 22:47     ` Michael Wookey
2008-09-08  5:26       ` Teemu Likonen
2008-09-07 13:23 ` Thomas Adam
2008-09-07 13:59   ` Teemu Likonen
2008-09-07 14:11     ` Thomas Adam
2008-09-08 17:41   ` Bob Hiestand
2008-09-09  6:26     ` "Peter Valdemar Mørch (Lists)"

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080907131356.GC3387@mithlond.arda.local \
    --to=tlikonen@iki.fi \
    --cc=git@vger.kernel.org \
    --cc=michaelwookey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).