VIM的源码安装
本文主要引用YouCompleteMe:Building Vim from source
OS:Raspbian 10(类debian) Kernel: armv7l
下载VIM 卸载系统自带VIM
1 | sudo apt install libncurses5-dev libgtk2.0-dev libatk1.0-dev \ |
特殊需求
但如果有特殊要求的,在 cd vim
后还需要手动配置一些参数
比如之后要安装补全插件YouCompleteMe
1 | cd vim |
注意 $(python3-config --configdir)
要自己去找到路径
我的路径为 /usr/lib/python3.7/config-3.7m-aarch64-linux-gnu
可供参考
对Ubuntu系统需要注意的是
Note for Ubuntu users: You can only use Python 2 or Python 3. If you try to compile vim with both python-config-dir and python3-config-dir, YouCompleteMe will give you an error YouCompleteMe unavailable: requires Vim compiled with Python (2.6+ or 3.3+) support, when you start VIM.
大意就是只能使用2或者3中的一个。所以上面的配置中我只开启了python3
最后
vim --version
检查是否安装成功