下载vim源码
http://www.vim.org/sources.php

设置编译选项, 我的配置是:

./configure  --prefix=/usr/local/vim \
--enable-multibyte \
--enable-fontset \
--enable-xim  \
--enable-gui=auto \
--enable-pythoninterp=dynamic \
--enable-pythoninterp \
--enable-python3interp=dynamic \
--enable-rubyinterp=dynamic \
--enable-rubyinterp \
--enable-perlinterp \
--enable-cscope \
--enable-sniff \
--with-x  \
--with-compiledby=erocpil  \
--with-features=huge \
--enable-luainterp=dynamic  \
--with-python-config-dir=/usr/lib/python2.7/config \
--with-python3-config-dir=/usr/lib/python3.2/config

其他选项参见 ./configure –help

补充说明:

在CentOS上编译时不支持“–enable-multibyte”

在debian上编译时不支持“–enable-fontset”