If you reading this article you're probably a Vim user or somebody who has lost. If you're a Vim lady or guy, that's great because I'll say something how to compile your brand new Vim instance, directly from the source files.Meantime you may wonder:Yeah, that is a really good question! However, there are also a lot of other phrases and opinions which might in a different level of details describe the advantages and disadvantages of both approaches.Although, straight to the point. If you compile and install from the source, the program is the best possible suited to your system's software but especially for the hardware. Moreover, you can use the latest versions, especially those not available in the package managers (edge versions).There are also some light and dark sides of doing it from the source, but IMHO for Vim, this is the best possible way to have a blazing fast text editor.
One click installer
For Linux distributions with apt-get package manager (basically all based on Debian, but other should also work) I've provided a simple one-click installer.
We need to check some related libraries and languages which Vim or Vim's plug-ins may require in order to work properly. Now we'll check only the most popular:
Lua + LuaJIT
Ruby
Perl
Python v2 & v3
The results of checking I've presented below, because I think that it might be helpful for many beginners as I was once ;)
$ perl -vThis is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi(with 44 registered patches, see perl -V for more detail)Copyright 1987-2013, Larry WallPerl may be copied only under the terms of either the Artistic License or theGNU General Public License, which may be found in the Perl 5 source kit.Complete documentation for Perl, including FAQ lists, should be found onthis system using "man perl" or "perldoc perl". If you have access to theInternet, point your browser at http://www.perl.org/, the Perl Home Page.
sh
$ which python/usr/bin/python
sh
$ which python3/usr/bin/python3
Installation for Linux
The installation is relatively simple. Probably the scariest thing while installation of Vim is the configuration of flags, but I'll try to cover this topic to be more obvious.
The flags are simple, but the hardest one might be --with-python-config-dir because the config directory can different depends on the system (different versions of Linux may have different locations for Python).
To check it, run:
sh
$ python-config --configdir
sh
$ python3-config --configdir
I my case they ware like those presented below:
for python 2: /usr/lib/python2.7/config-x86_64-linux-gnu
for python 3: /usr/lib/python3.4/config-3.4m-x86_64-linux-gnu
The downloaded version of Vim also matters. If a downloaded version of Vim is v7.4 you should write vim74 or if the version is v8.0 then you should write vim80. You're obligated to correct those paths with relevant VIMRUNTIMEDIR configuration variable. In the script below it's already set to vim80.
If all goes well, now you can check if Vim is available for you via the console. You will also see that the + is near all relates libraries or languages.
If you don't know which is the latest version (tag) from Vim's repository on GitHub and you downloaded repo via git clone, then run this command $ git describe --abbrev=0 --tags in order to check the latest tag.