Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim plugins for version control

Tags:

vim

dvcs

There are plugins like vcscommand that work for (almost) any vcs and plugins like fugitive that are specific to one vcs.

  • What are the advantages/disadvantages of plugins like fugitive over vcscommand?
  • What plugins (or other tricks) do you use for versioning with vim?
like image 749
Eelvex Avatar asked Mar 20 '11 13:03

Eelvex


People also ask

Does Vim have version control?

Yes, you can add undo branches functionality that makes it more like a version control system. In vim 7.3 you can have persistent undo, as described here, you only need to add the following lines to your . vimrc .

What is Vim plugin?

vim is a plugin that wraps the command-line fuzzy finder program fzf, allowing you to use it directly within Vim. Fzf is a fast and portable fuzzy finder application written in Go. It is a requirement for the Vim plugin, so make sure you install it first.

How do I download Vim plugins?

Plugin Manager Installation: To install vim plugin you need to make to directories autoload and bundle inside . vim directory and curl pathogen. vim to autoload. After running these commands make vimrc file inside .


1 Answers

  • What are the advantages/disadvantages of plugins like fugitive over vcscommand?

The short answer

VCSCommand works with many version control systems. Good if you have more than one in your organization -- same key mappings for all repos you work with.

Fugitive is tight git-to-vim integration. Browsing and editing your git repository, index, and local files becomes seamless.

The longer answer

I use both. I think they compliment each other and don't have anything bad to say about either plugin, at least nothing that a few keymappings doesn't solve.

VCSCommand is my research tool. I use it to log, annotate, diff, vimdiff and only occasionally commit (due to workplace workflow) and it works great. I switch between git and cvs repositories often and appreciate having the same mappings no matter what repo (directory) I'm using.

Using the buffer variable b:VCSCommandVCSType and a key mapping, I'm also able to support two repositories in the same directory at work . (CVS/git -- not recommended for the fainthearted, but great for managing local edits with some practice and sane .gitignore rules.)

Fugitive is a fantastic git-in-vim interface. I say git-in-vim because that's the best explanation I can think of. As I mentioned earlier it blurs the lines between your repository, index, and local files -- total freedom. Commands like 'Glog' and 'Gedit' are very intuitive and extremely useful.

If you like git and vim, install fugitive. And pathogen. Pathogen takes the pain out of vim plugin management. Do it.

  • What plugins (or other tricks) do you use for versioning with vim?

I highly recommend svndiff. svndiff at vim.org Despite its name, it works on many VCS's (git/svn/CVS.) Opening a modified file and hopping directly to the next/previous modified (or deleted/added) section is fantastic. You can see all your changes (visible in the window) at a glance. Your vim will need +signs compiled in but it's an amazing accelerator.

Extradite for fugitive is also recommended for git commit browsing. http://int3.github.com/vim-extradite/

like image 179
zen Avatar answered Oct 15 '22 23:10

zen