Configure, Compile and Install Vim
Install required libraries
sudo apt-get build-dep vim
Download the latest VIM version from github, e.g.
mkdir -p ./git/vim; cd ./git/vim
git clone https://github.com/vim/vim
The most practical way to make the configuration is to set configuration options directly in the Makefile. First make a copy of the Makefile
cp ./src/Makefile ./src/Makefile.backup
If you are familiar with git the last step isn't necessary since you can easily restore the origin state of all files with git clean -dfX or simple restore the Makefile with git restore Makefile.
If you prefer to compile a official release you have to checkout as so called tag. To list available tags type git tag --list. To compile such a release you have to checkout a tag like git checkout v9.0.1440. From my experience there is noting wrong by directly compile the so called master branch (up to date source code).
Afterwards open the ./src/Makefile and then uncomment (delete the #) lines you like to be compiled and installed.
vi ./src/Makefile
To adapt features you have to edit the src/feature.h file
vi ./src/feature.h
It is recommended for unix to make the basic choice by adding it to the configure command.
Basic choices are:
- tiny - almost no features enabled, not even multiple windows
- small - few features enabled, as basic as possible
- normal - a default selection of features enabled
- big - many features enabled, as rich as possible
- huge - all possible features enabled
Then configure vim to apply your settings
./configure --with-features=huge
Afterwards simply compile
make -j `nproc` # compile with max. number of processors
and install it with
sudo make install