vim增加python3编译器的支持
注意:网上看的教程都是linux环境的配置方法不适合mac
使用brew重新安装python3
brew reinstall python3
使用brew安装vim
brew install vim
Python has been installed as
/usr/local/opt/python@3.8/bin/python3You can install Python packages with
/usr/local/opt/python@3.8/bin/pip3 installThey will install into the site-package directory
/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packagesSee: https://docs.brew.sh/Homebrew-and-Python
python@3.8 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have python@3.8 first in your PATH run:
echo ‘export PATH=“/usr/local/opt/python@3.8/bin:$PATH”’ >> ~/.zshrc
安装vim后发现同时安装了python3.8,所以把python3.8做为python3的默认编译器
echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/vim/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
查看vim是否支持python3编译
vim --version | grep python
➜ ~ vim --version | grep python
+comments +libcall -python +visual
+conceal +linebreak +python3 +visualextra
python3前面是+号说明已经支持python3的编译了