Re-compile VIM with options
When you compile vim you can pass the option/flag --with-features
, e.g.:
--with-features=huge
This will determine which features are included in the install. A list of all features can be found here (http://vimdoc.sourceforge.net/htmldoc/various.html) with a letter indicating which version the feature is included in:
Here is an overview of the features.
The first column shows the smallest version in which
they are included:
T tiny
S small
N normal
B big
H huge
m manually enabled or depends on other features
(none) system dependent
Thus if a feature is marked with "N", it is included
in the normal, big and huge versions of Vim.
For example if you wanted arabic language feature you would have to have --with-features=big
*+feature-list*
*+ARP* Amiga only: ARP support included
B *+arabic* |Arabic| language support
N *+autocmd* |:autocmd|, automatic commands
... etc
First, you need to get the source code, easiest through Vim's Mercurial repository; see vim.org for details.
Then, you need a build environment and the dev libraries, especially for the desired Python. This greatly depends on the platform. On Ubuntu / Debian, it's a simple
$ sudo apt-get build-dep vim-gnome
An Internet search will tell you more.
To compile with the features, you pass those to
$ ./configure --enable-pythoninterp --enable-python3interp
Watch its detection output closely.
Finally, you can compile and install:
$ make
$ sudo make install
This will (on Linux) install Vim to /usr/local/bin/vim
, so it doesn't interfere with the default /usr/bin/vim
, and you don't need to uninstall anything; just make sure that the former comes first in your PATH
.
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
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