编译vim支持python3

系统:uos
为了让vim支持C语言的代码提示,听说需要vim支持python

vim --version
发现系统自带的vi的python和python3前面都是减号。所以需要编译.我从欧拉仓库下载了8.2版的压缩包
https://gitee.com/src-openeul...
在根目录配置
./configure --enable-multibyte --enable-fontset --enable-xim --enable-gui=auto --enable-luainterp=dynamic --enable-python3interp=yes --enable-rubyinterp=dynamic --enable-perlinterp --enable-cscope --with-compiledby=erocpil --with-features=huge --with-python3-command=python3 -with-python3-config-dir=/lib/python3.7/config-3.7m-x86_64-linux-gnu> note.txt
make之后,我进入src目录执行,vim --version发现仍然是减号。于是,查看配置的输出,其中搜索python发现,Python's configuration directory。于是我去掉一些唠叨的结尾
./configure --enable-multibyte --enable-fontset --enable-xim --enable-gui=auto --enable-luainterp=dynamic --enable-python3interp=yes --enable-rubyinterp=dynamic --enable-perlinterp --enable-cscope --with-compiledby=erocpil --with-features=huge
再make后,发现python3前面是加号了。
然后我给原来的/usr/bin/vi修改软连接到src下的vim,并没有动原来的/usr/bin/vim
运行vi,会有报错但不影响程序执行:
Error detected while processing ~/.vimrc:
line 78:
E484: Can't open file /usr/local/share/vim/syntax/syntax.vim
Press ENTER or type command to continue
我打开vimrc
77 "colorscheme shine
78 syntax on
79 "设置高亮搜索
【编译vim支持python3】虽然不懂原因,只要把78行注释掉。就不会报错了。哪位兄弟知道报错原因的,多谢指点!

    推荐阅读