Build Vim With Custom Python (e.g. EPD) Support


1.Make sure which python gives the specific python you want to build vim with.

2.If possible, remove the origin python built in your system (/usr/bin/python) or go to 3

pacman -R python2    # you can use your own package manager

3.If you don’t remove the python packaged with your system, you may have in your /usr/lib or /usr/local/lib, which may bring troubles in the following installation. So mask them first

cd /usr/lib          # or /usr/local/lib
sudo mv
sudo mv


Download the Vim source, in arch

abs extra/vim
cp -r /var/extra/vim ~/abs/vim

Configure your vim installation with python support, e.g

./configure --prefix=/path/to/your/installdir/ \
            --with-features=huge \
            --enable-gpm \
            --enable-acl \
            --enable-multibyte \                                                # for UltiSnip and NERDTree
            --enable-cscope \
            --enable-perlinterp \
            --enable-pythoninterp \
            --with-python-config-dir=/usr/local/epd-7.3-2/lib/python2.7/config   # this line could be omitted

Notice: During the configuration procedure of latest vim version, configure tries to find python2 instead of python, so make sure python2 link to your desired python program. Otherwise, vim will always use /usr/bin/python2 which links to the system’s default python.


Unmask your original pythonlib

sudo mv
sudo mv

Table Of Contents

Previous topic

Vim 常用命令与快捷键

Next topic


This Page