wfxr
9/16/2016 - 4:35 AM

build-vim-from-source.md

See https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

See http://www.xorpd.net/blog/vim_python3_install.html (suggested)

configure example (tested on Ubuntu 16.04):

./configure \
    --with-features=huge \
    --enable-perlinterp \
    --enable-pythoninterp \
    --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
    --enable-python3interp \
    --with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu \
    --enable-rubyinterp \
    --enable-cscope \
    --enable-gui=auto \
    --enable-gtk2-check \
    --enable-gnome-check \
    --enable-multibyte \
    --with-x \
    --with-compiledby="xorpd" \
    --prefix=/usr

Note

使用如下命令一次安装编译vim所需的环境:

apt-get build-dep vim

python的版本位数要和vim的一致(不能一个是32位,一个是64位)

如果不安装gvim,vim不能使用系统剪贴板

如果要同时编译gvim,需要先运行如下命令安装完整的编译环境(需要source源)

编译安装YouCompleteMe插件时,最好使用通过apt安装的编译器,否则可能出现编译成功但运行出错的奇怪问题。