How to Compile Vim
Compiling on Ubuntu
To build vim from source on Ubuntu:
- Get a copy of the source code by downloading from the official Vim repository on GitHub.
- Get the dependencies by running
$ sudo apt-get build-dep vim-gnomeor similar.
- Go to the directory of the Vim source code:
$ ./configure. You can customize the build (and enable Perl, Python, etc. language integrations) by passing configuration options. See
src/INSTALLfor an overview.
- Finish the installation by running
$ sudo make install. As your self-compiled Vim is not managed by the package manager, it will be placed in
/usr/local/bin/vim, instead of
/usr/bin/vim. So, to run it, you either need to specify the full path, or ensure that
PATH(it usually is).
- (Optional) Remove the distribution-provided version of Vim if you had it installed already:
$ sudo apt-get remove vim vim-runtime gvim.
To verify the installation, you can run
$ which vim which should return something like
/usr/local/bin/vim if the installation was successful.
This modified text is an extract of the original Stack Overflow Documentation created by following contributors and released under CC BY-SA 3.0
This website is not affiliated with Stack Overflow