YouCompleteMe 无法自动完成

YouCompleteMe can't autocomplete

我想开发C/C++程序,所以我给Vim安装了YouCompleteMe,通过Vundle.but无法正常运行,其实只显示里面的字在当前file.hope求助! 我的步骤如下:

    git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim

    set nocompatible
    filetype off
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    Plugin 'gmarik/Vundle.vim'
    Plugin 'Valloric/YouCompleteMe'
    call vundle#end()
    filetype plugin indent on

`:PluginInstall`

    http://llvm.org/releases/download.html#3.6.0
    http://www.cmake.org/download/


    Extract "clang+llvm-3.6.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz" into ycm_temp
    Rename "clang+llvm-3.6.0-x86_64-linux-gnu" to "llvm_root_dir"
    Extract cmake-3.2.2-Linux-x86_64.tar.gz and Link bin/cmake to /usr/bin/cmake


    cd ~
    mkdir ycm_build
    cd ycm_build
    cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/ycm_temp/llvm_root_dir . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
    make ycm_support_libs


    let g:ycm_seed_identifiers_with_syntax=1
    let g:ycm_global_ycm_extra_conf = '/home/li/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
    let g:ycm_confirm_extra_conf=0
    let g:ycm_collect_identifiers_from_tag_files = 1
    set completeopt=longest,menu

现在,不会抛出错误或警告,但无法自动完成 C/C++ 头文件!

OS:ubuntu 14.04
vim:7.4
Python:2.7.6

使用快捷键 Ctrl-X + Ctrl-O 检查 omni 补全(功能)。

会触发omni功能,

and/or 从以下 link 下载 .ycm_extra_conf.py >> https://github.com/rasendubi/dotfiles/blob/d534c5fb6bf39f0d9c8668b564ab68b6e3a3eb78/.vim/.ycm_extra_conf.py

并将其放入.vim,然后将以下内容添加到.vimrc

let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'