The following is a list of commands that may be execute when viewing a file versioned in cvs, subversion, mercurial, or git (where applicable).
:VcsAnnotate - This command will run annotate / blame and visually annotate the current file via vim’s sign support. Due to vim limiting sign text to a maximum of two characters, the sign text will be the first two characters of the username. This command will also create a CursorHold event which will echo the version number and full author name for the current annotated line.
Running this command on an already annotated file removes all annotations and disables the CursorHold event.
:VcsLog - Opens a buffer with log information for the current file. In this buffer you can perform various operations (diff, annotate, view log for another file, etc.) by hitting <Return> on any of the text links denoted by ‘|link name|’ (ex. ‘|annotate|’).
By default the number of entries retrieved will be limited to 50 in an effort to reduce the latency of retrieving logs for files with a long revision history. This value can be changed via the g:EclimVcsLogMaxEntries variable.
:VcsChangeSet [revision] - Opens a buffer with change set information for the supplied repository version or the current revision of the currently open file. The special revision “prev” can be used to see the changeset of the previous repository version.
Like :VcsLog, this buffer will contain text links which allow you to perform other operations.
The following list of commands are similar to those above, but instead of opening a local buffer, these commands all open a url in the browser so that you can use your favorite vcs web front end (viewvc, trac, etc.).
Vim Settings
Eclim Settings
org.eclim.project.vcs.web.viewer - The web viewer to use. Possible values include:
viewvc
trac
hgcgi
hgserve
gitweb
redmine
github
googlecode
bitbucket
Note
Currenlty redmine is only partially supported with mercurial since redmine uses local revision numbers instead of the universal change set ids.
Ex. An example using viewvc.
org.eclim.project.vcs.web.viewer=viewvc
org.eclim.project.vcs.web.url - Base url used for the chosen web viewer.
Examples:
# viewvc
org.eclim.project.vcs.web.url=http://myhost/viewvc/myrepos/
# hgcgi
org.eclim.project.vcs.web.url=http://hg.myhost/myrepos
# gitweb
org.eclim.project.vcs.web.url=http://localhost:1234?p=.git
# redmine
# Note the literal <cmd> portion. Since redmine urls place the command name
# (log, changes, etc) in front of the repository name, you must include the
# <cmd> placeholder in your configured url so that the :VcsWeb commands can
# replace it with the proper value.
org.eclim.project.vcs.web.url=http://redmine.myhost/repositories/<cmd>/myrepos
# github
org.eclim.project.vcs.web.url=http://github.com/username/my-project
# googlecode
org.eclim.project.vcs.web.url=http://code.google.com/p/my-project
# bitbucket
org.eclim.project.vcs.web.url=http://bitbucket.org/username/my-project
Subversion, mercurial, git, and cvs all support using vim as the default editor for composing commit messages. When composing this message they all also include a list of files to be committed. Eclim allows you to hit <enter> on one of the files to view a diff of the version to be committed against the last committed version, or in the case of newly added files, view the file to be added.
Note
Git users: Issuing a git commit from any directory other than the root of your working copy may lead to errors when attempting to view a diff or file in the editor. This is due to git changing the working directory to the root but leaving the displayed file paths as relative, preventing eclim from being able to determine where those files reside. To resolve this issue you will need to run the following to configure git to always display the full path (like mercurial does by default):
$ git config --global status.relativePaths false