git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Extremely simple Vim interface for Git

From
TLTeemu Likonen <tlikonen@iki.fi>
Date
Sep 7, 2008, 13:59 UTC
Message-ID
<20080907135952.GD3387@mithlond.arda.local>
In-Reply-To
<18071eea0809070623v4a54cbb8j2face0724651ef56@mail.gmail.com>
Thomas Adam wrote (2008-09-07 14:23 +0100):
Show 12 quoted lines
> 2008/9/6 Teemu Likonen <tlikonen@iki.fi>:
> > Here's a very simple idea for using Git from Vim editor. Add these lines
> > to your ~/.vimrc file:
> >
> >
> >    command! -complete=file -nargs=* Git   call s:RunShellCommand('git '.<q-args>)
> >    command! -complete=file -nargs=* Svn   call s:RunShellCommand('svn '.<q-args>)
> >    command! -complete=file -nargs=+ Shell call s:RunShellCommand(<q-args>)
> 
> Looks interesting.  Have you seen this though:
> 
> http://code.google.com/p/vcscommand/

I have tried it but I made my own because I'm familiar with git's command line interface and want to use it inside Vim without (too many) restrictions. I find this approach easier because I don't need to learn another interface layer.

I'd like to add a hint that Vim command line expands % to current file name. Examples:

    :Git add %
    :Git blame -C %
Previous: Thomas AdamNext: Thomas Adam
Message 8 of 11 in “Extremely simple Vim interface for Git”
  1. Teemu LikonenSep 6, 2008
  2. Michael WookeySep 7, 2008
  3. Teemu LikonenSep 7, 2008
  4. Teemu LikonenSep 7, 2008
  5. Michael WookeySep 7, 2008
  6. Teemu LikonenSep 8, 2008
  7. Thomas AdamSep 7, 2008
  8. Teemu LikonenSep 7, 2008
  9. Thomas AdamSep 7, 2008
  10. Bob HiestandSep 8, 2008
  11. Peter Valdemar Mørch (Lists)Sep 9, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.