tags:

views:

85

answers:

2

which VCS (git, hg) plugin for vim do you recommend?

+2  A: 

vcscommand.vim is what you're looking for. I haven't used it with Git or Mercurial, but I do use it with Subversion to great effect. Check out the documentation, which details all of the commands; the mapping section tells you how to invoke them:

|<Leader>|ca VCSAdd
|<Leader>|cn VCSAnnotate
|<Leader>|cN VCSAnnotate!
|<Leader>|cc VCSCommit
|<Leader>|cD VCSDelete
|<Leader>|cd VCSDiff
|<Leader>|cg VCSGotoOriginal
|<Leader>|cG VCSGotoOriginal!
|<Leader>|ci VCSInfo
|<Leader>|cl VCSLog
|<Leader>|cL VCSLock
|<Leader>|cr VCSReview
|<Leader>|cs VCSStatus
|<Leader>|cu VCSUpdate
|<Leader>|cU VCSUnlock
|<Leader>|cv VCSVimDiff

I usually do most of these things in a terminal beside my Vim window, but annotate (\cN if you're using the default leader) pops up the annotation in a new split, which is super useful

Drew Stephens
VCSCommand works nicely with CVS and SVN, but its git integration isn't all that hot as it tries to `commit` the current file, rather than working with git's stage-commit workflow.
Johnsyweb
+1  A: 

For git, I recommend fugitive. I especially like the nice integration of the diff mode, (:Gdiff) which makes it possible to do interactive add.

François