ycm安装细则

before:

Ensure that your version of Vim is at least 7.4.1578 and that it has support for Python 2 or Python 3 scripting.

1.Install YCM

you can install it with Vundle (or Pathogen, but Vundle is a better idea)

but If you don't install YCM with Vundle, make sure you have run this command after checking out the YCM repository (Vundle will do this for you)

git submodule update --init --recursive

2.C-family languages(if you need)

    2.1、Download the latest version of libclang ->libclang下载

3.Compile the ycm_core library

    3.1  create a new folder where build files will be placed. Run the following:

cd ~
mkdir ycm_build
cd ycm_build

    3.2 generate the makefiles:

    if you don't need c-family languages:

    generator is "Unix Makefile" on unix-like os

cmake -G "<generator>" . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp

    if you need ,and you downloaded LLVM binary package, not a custom-built LLVM

cmake -G "<generator>" -DPATH_TO_LLVM_ROOT=~/ycm_temp/llvm_root_dir . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp

    if you have you use the system version of libclang, you would pass -DUSE_SYSTEM_LIBCLANG=ON to cmake instead ofthe -DPATH_TO_LLVM_ROOT=...

or you have a pre-built clang:

-DEXTERNAL_LIBCLANG_PATH=/path/to/libclang.so

For those who want to use the system version of boost, you would pass-DUSE_SYSTEM_BOOST=ON to cmake

NOTE: I STRONGLY recommend AGAINST use of the system boost/libclang insteadof the bundled version of boost/libclang


    3.3 build

cmake --build . --target ycm_core --config Release

4. Last

cp ~/.vim/bundle/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py ~/.vim/



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值