7

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

10

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 https://vim.googlecode.com/hg/ 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 http://www.drchip.org/astronaut/vim/vimfeat.html for a description of the different feature sets)

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

If ./configure finished without any problems, then run

make

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.

  • 1
    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
  • 1
    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
  • 1
    Anybody has an updated recipe for gvim 8.* on github? I get 'vim' to be build, but not 'gvim'. – Hans Deragon Dec 20 '16 at 13:01
  • It might be failing to compile gvim if it decides to use gtk3 instead of gtk2. The latest versions of Ubuntu seem to have a vim-gtk3 package - maybe try running sudo apt-get build-dep vim-gtk3 before compiling your own – mjr Mar 20 '17 at 18:53

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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