First, we need to install all the dependencies for building Vim from source:
Then, we need to create a symlink (as per the instruction from the YouCompleteMe wiki):Next, clone the Vim source code and change to the directory containing the source code:
Now we can issue the configure command:
The CFLAGS=-fPIC and --with-tlib=ncurses are to prevent the following "no terminal library found" error (source):
The CFLAGS=-O is to prevent the following "_FORTIFY_SOURCE" warning:
The CFLAGS=-Wformat is to prevent the following "-Wformat-security" error:
Note that you should adjust this command to your needs. I have enabled (amongst others) Python support and gVim. After configuring we can use make to compile:
Now install Vim system-wide:
And set it as the default editor:
I hope this will be useful to you. Enjoy your custom built Vim!