1、wget http://llvm.org/releases/3.5.1/clang+llvm-3.5.1-x86_64-fedora20.tar.xz
xz -d clang+llvm-3.5.1-x86_64-fedora20.tar.xz
tar xvf clang+llvm-3.5.1-x86_64-fedora20.tar
cd clang+llvm-3.5.1-x86_64-fedora20
注:也可用tar xvf clang+llvm-3.5.1-x86_64-fedora20.tar.xz解壓
2、在/etc/profile這個(gè)檔案最尾端添加以下兩行代碼:
PATH=/usr/local/cmake/bin:/usr/clang_3_3/bin:$PATH
export PATH
3、執(zhí)行更新變量:source /etc/profile
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/y cmd/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_confirm_extra_conf = 0
let g:ycm_semantic_triggers = {
\ 'c' : ['->', ' ', '.', ' ', '(', '[', ''],
\ 'cpp,objcpp' : ['->', '.', ' ', '(', '[', '', '::'],
\ 'perl' : ['->', '::', ' '],
\ 'php' : ['->', '::', '.'],
\ 'cs,java,javascript,d,vim,python,perl6,scala,vb,elixir,go' : ['.'],
\ 'ruby' : ['.', '::'],
\ 'lua' : ['.', ':']
\ }