一、复制vimrc配置
- 复制自己github配置:https://github.com/tlwlmy/vim
- mac配置:https://github.com/tlwlmy/vim/blob/master/vimrc
二、安装vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
三、安装插件
- BudleInstall安装
- 如果clone不成功项目,重新执行多几次,有些项目名字换,下载不了直接上github.com搜索
四、问题
YouCompleteMe unavailable: requires Vim compiled with Python (3.8.0+) support.
Press ENTER or type command to continue
- vim版本太低,需要重新安装,支持python3.6以上版本
vim --version | grep python
alias python="python3.11"
python -V
brew install vim
echo '
alias vim="/usr/local/bin/vim"
alias vimdiff="/usr/local/bin/vimdiff"
alias vi="/usr/local/bin/vi"
alias view="/usr/local/bin/view"
alias vimdiff="/usr/local/bin/vimdiff"
alias vimtutor="/usr/local/bin/vimtutor"
' >> ~/.zshrc
source ~/.zshrc
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- jedi-vim: Error when loading the jedi python module (module ‘jedi’ has no attribute
https://github.com/davidhalter/jedi-vim
git clone --recursive https://github.com/davidhalter/jedi-vim.git ~/.vim/bundle/jedi-vim
五、YouCompleteMe编译安装
cd ~/.vim/bundle/YouCompleteMe
python3.11 install.py --all --verbose
六、参考