整个安装过程实在太痛苦了,所以这里记录下。
- Install CMake(brew install cmake)
- cd ~/.vim/bundle
- git clone https://github.com/Valloric/YouCompleteMe.git
- cd ~/.vim/bundle/YouCompleteMe
- git submodule update --init --recursive
- mkdir YouCompleteMe/ycmbuild
- cd YouCompleteMe/ycmbuild
- cmake -G “Unix Makefiles” . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/
- make ycm_core
- Restart Vim
- Enjoy
自动补全就起作用了。