Follow the online tutorial to install the software, none of which is successful (or probably not). Oneself from the net patchwork, finally let own vim intelligent identification.
1. Upgrade Vim: (Ubuntu)
sudo add-apt-repository ppa:jonathonf/vimsudo apt updatesudo apt install vim
2. Installing Vundle
git clone Https://github.com/gmarik/vundle.git ~/. Vim/bundle/vundle
3. Download YCM
CD ~/.vim/
git clone--recursive https://github.com/Valloric/YouCompleteMe.git
CD ~/.vim/bundle/youcompleteme
git submodule update --init --recursive
4. 安装libclang
apt-get install llvm-3.9 clang-3.9 libclang-3.9-dev libboost-all-dev
5. Compilingycm_core库
mkdir 123 && cd 123
cmake -G "Unix Makefiles" -DUSE_SYSTEM_BOOST=ON -DUSE_SYSTEM_LIBCLANG=ON . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
或者
Cmake-g"Unix makefiles"-duse_system_boost=on-dexternal_libclang_path=/usr/lib/x86_64-linux-gnu/libclang-3.9.so. ~/.vim/bundle/youcompleteme/third_party/ycmd/cpp #未验证
CMake--build. --target Ycm_core--config Release
6. Configuration
#perl警告处理
echo "Export Lc_all=c" >>/ROOT/.BASHRC
Source/root/.bashrc
CP ~/.vim/bundle/youcompleteme/third_party/ycmd/examples/.ycm_extra_conf.py ~/.vim/
Configure VIMRC
"~/.VIMRC
Let g:ycm_server_python_interpreter= '/usr/bin/python2.7 ' "compile Python version at that time
Let g:ycm_global_ycm_extra_conf= ' ~/.vim/.ycm_extra_conf.py '
Set nocompatible "be improved
Set rtp+=~/.vim/bundle/vundle/
Call VUNDLE#RC ()
"Let Vundle manage Vundle
"Required!
Bundle ' scrooloose/syntastic '
Bundle ' Gmarik/vundle '
"My bundles here:
"
"Original repos on GitHub
Bundle ' tpope/vim-fugitive '
Bundle ' Lokaltog/vim-easymotion '
Bundle ' Rstacruz/sparkup ', {' RTP ': ' vim/'}
Bundle ' Tpope/vim-rails.git '
"Vim-scripts Repos
Bundle ' L9 '
Bundle ' Fuzzyfinder '
"Non-github Repos
Bundle ' Git://git.wincent.com/command-t.git '
"Git repos on your local machine (i.e. if working on your own plugin)
Bundle ' File:///Users/gmarik/path/to/plugin '
" ...
Bundle ' Valloric/youcompleteme '
FileType plugin indent on "required!
"Encoded as Utf-8
Set fileencodings=utf-8,gb2312,gbk,gb18030
Set Termencoding=utf-8
Set Encoding=utf-8
Show Results:
Vim Smart Tip Plugin Youcompleteme Installation