sponsor Vim development Vim logo Vim Book Ad

hgrev : Display Mercurial revision info in the Vim statusline.

 script karma  Rating 14/5, Downloaded by 496    Comments, bugs, improvements  Vim wiki

created by
Mahlon Smith
script type
HGRev is a small plugin that can find the current buffer's revision ID from a Mercurial (http://mercurial.selenic.com/) repository.

It is intended for use in the Vim statusline - here's an example to enable it:

   set statusline=[r%{HGRev()}]

HGRev exports the "HGRev()" function (for use in the statusline), and
a command called ":RefreshMercurialRev", which you can use to manually
update the revision information for the current buffer.  If you've added
HGRev() to your statusline, you'll see the file revision, branch, tags,
and file status reflected -- if you used the statusline example above,
you should see something like this:

   [r192+ default tip M]

The information displayed can be easily customized, and HGRev can also
automatically update the status line on file changes.  (This behavior is
disabled by default -- see the documentation for details.)

Once installed, HGRev has built-in help.  Access it via ":help HGRev".
install details
Install the VimBall plugin (vimscript #1502) if you don't already have it.

Then open hgrev.vba.gz from within vim.

    :so %

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
hgrev.vba.gz 0.2 2012-09-12 7.0 Mahlon Smith Don't try to find an HG repo on remote buffers.  (Miguel Ventura <miguel.ventura@gmail.com>)
hgrev.vba.gz 0.1 2010-07-08 7.0 Mahlon Smith Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo