A Mercurial wrapper for Vim.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
autoload Add `:Hgchangestatus` to show the status of any changeset. Jan 11, 2017
doc add documentation Dec 18, 2015
ftdetect Added syntax highlighting for hgstatus window. Dec 10, 2011
ftplugin Moving `hglog` file type plugin to `ftplugin` directory where it belo… Nov 11, 2012
plugin Split plugin file into multiple extensions. Jun 13, 2016
resources `Hglog` window improvements: Nov 11, 2012
syntax Syntax highlighting for `Hgwannotate`. Jul 25, 2014
.hgignore Ignore tags Aug 6, 2014
.hgtags Added tag 0.4.0 for changeset e4e29a1da13c Dec 28, 2014
README.markdown Fixed incorrect URL in README. Feb 13, 2012



Lawrencium is a Mercurial wrapper for Vim, inspired by Tim Pope's Fugitive.


The recommended method to install Lawrencium is to use Pathogen, also from Tim Pope:

cd ~/.vim/bundle
hg clone https://bitbucket.org/ludovicchabant/vim-lawrencium

You can then update the help tags with :call pathogen#helptags() and browse Lawrencium's help pages with :help lawrencium.

Quick Start

Open a file from one of your Mercurial repositories.

:e ~/Work/Project1/src/foo.py

Work on it for a bit, then open another file, this time using Hgedit and a repository-relative path:

:Hgedit src/bar.py

Take advantage of the auto-completion when typing the path! Work on that other file too, then compare it to the parent revision version:


Continue working. At any moment, you can run a Mercurial command and get a quick glance at its output:

:Hg log --limit 5 src/blah/bleh

Note how auto-completion will help you with all the built-in commands and their options! Any other parameter will auto-complete with repository-relative paths.

Once you're happy with your work, bring up the status window:


You can see the difference between modified files and their parent revision version easily by moving the cursor to the appropriate line and hitting . You can also do an addremove by using (use the selection mode to add/remove several files at once!).

Now it's time to commit. While still in the status window, remove all mentions of files you don't want to commit, and hit . Write your commit message, go :wq, and you're done! You can check everything went fine:

:Hg tip

You can also commit faster with the :Hgcommit command of course!

And that's it for now. Open the help file with :help lawrencium, and post your questions and problems in the issue tracker on BitBucket.