which VCS (git, hg) plugin for vim do you recommend?
- What do you mean by "VCS plugin"? What kind of actions do you expect it to do?P Shved– P Shved2010-09-06 17:43:06 +00:00Commented Sep 6, 2010 at 17:43
- VCS=Version control system. I search a plugin to integrate git to vimJuanPablo– JuanPablo2010-09-06 17:48:13 +00:00Commented Sep 6, 2010 at 17:48
- I know what VCS means. But I don't know what "integrate git to vim" means. What do you expect from such "integration"?P Shved– P Shved2010-09-06 17:54:11 +00:00Commented Sep 6, 2010 at 17:54
- The Emacs-modules for VC-integration contains support for diffing, annotation (svn blame), and a couple of other thing.sJesperE– JesperE2010-09-06 18:01:17 +00:00Commented Sep 6, 2010 at 18:01
2 Answers
For git, I recommend fugitive. I especially like the nice integration of the diff mode, (:Gdiff) which makes it possible to do interactive add.
Comments
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
1 Comment
commit the current file, rather than working with git's stage-commit workflow.