vim8编译支持python3(centos7.6升级vim7.4到vim8)

vim8编译支持python3

0、移除原来的vim

yum -y remove vim  

1、下载

git clone https://github.com/vim/vim.git

或者从服务器拉

scp -rp [email protected]:/root/vim  /root

2、进入vim

cd vim

3、安装依赖

sudo yum install -y ruby ruby-devel lua lua-devel luajit luajit-devel ctags git python python-devel python3 python3-devel tcl-devel perl perl-devel perl-ExtUtils-ParseXS perl-ExtUtils-XSpp perl-ExtUtils-CBuilder perl-ExtUtils-Embed

4、建立软连接

sudo ln -s /usr/bin/xsubpp /usr/share/perl5/ExtUtils/xsubpp

5、编译

./configure --with-features=huge \
    --enable-multibyte \
    --enable-rubyinterp=yes \
    --enable-python3interp=yes \
    --with-python-config-dir=/usr/local/python3/lib/python3.6/config-3.6m-x86_64-linux-gnu
    --enable-perlinterp=yes \
    --enable-luainterp=yes \
    --enable-gui=gtk2 \
    --enable-cscope \
    --enable-xim \
    --with-x \
		--with-gnome \
    --prefix=/usr/local

6.make

make VIMRUNTIMEDIR=/usr/local/share/vim/vim81

7.安装到系统

sudo make install

8.查看特性是否已经开启

vim --version | grep python

你可能感兴趣的:(技巧,vim)