Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have found that I need to compile the lastest gvim due to a bug I have reported, but how do I proceed?

share|improve this question
up vote 8 down vote accepted

Run the following commands in the terminal.

sudo apt-get build-dep vim-gnome

to get all the build dependencies you need. Then

sudo apt-get install mercurial

to get the Mercurial version control system needed to download the latest Vim source code. Then

hg clone vim

to download the Vim source code to the subdirectory vim of the current directory.

cd vim/src

to change to the right directory

Now let's configure Vim for compilation (with "huge" features - see for a description of the different feature sets)

./configure --prefix=/usr/local --with-features=huge

If ./configure finished without any problems, then run


and then

sudo make install

and that should be it.

To update Vim to the latest version, just go into the vim directory and run

hg pull
hg update

and then re-run configure, make and make install.

share|improve this answer
Thanks a lot my vim is working now however gvim is still using another version how do I instruct gvim to load the same version as vim? – Tom May 6 '12 at 18:03
Unless you need the old version still, you should probably delete it using sudo apt-get remove vim-gnome. Otherwise you would have to ensure that /usr/local/bin appears before /usr/bin in the $PATH environment variable, which you should look up separately. – mjr May 6 '12 at 18:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.