Install YCM on CentOS

Source: Internet
Author: User

Install YCM on CentOS

1. Install vundle

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

2. Configure. vimrc

set nocompatible  filetype offset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()Plugin 'VundleVim/Vundle.vim'Plugin 'tpope/vim-fugitive'call vundle#end()     Bundle 'Valloric/YouCompleteMe'filetype plugin indent on

3. Open vim to run

:BundleInstall

4. install necessary tools

1. yum install gcc-c ++ make automake python-devel2, install CMakewget http://www.cmake.org/cmake/resources/software.htmltar-zxv-f cmake -*. *. *. * .tar.gz cd cmake -*. *. *. * .tar.gz. /bootstrapgmakegmake install

5. Install clang + llvm (compiled here)

1. wget http://llvm.org/releases/3.5.1/clang+llvm-3.5.1-x86_64-fedora20.tar.xzxz-d clangw.llvm-3.5.1-x86_64-fedoraw.tar. xztar xvf clang+llvm-3.5.1-x86_64-fedora20.tar cd clang + llvm-3.5.1-x86_64-fedora20 Note: tar xvf clangw.llvm-3.5.1-x86_64-fedoraw.tar is also available. xz decompress 2. Add the following two lines of code at the end of the/etc/profile file: PATH =/usr/local/cmake/bin:/usr/clang_3_3/bin: $ PATHexport PATH3: Execute the update variable: source/etc/profile

6. Go to the YCM directory and run

./install.sh –clang-completer

7 ~ /. Configure vimrc

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 = 0let g:ycm_semantic_triggers = {  \   'c' : ['->', '    ', '.', ' ', '(', '[', '&'],\     'cpp,objcpp' : ['->', '.', ' ', '(', '[', '&', '::'],\     'perl' : ['->', '::', ' '],\     'php' : ['->', '::', '.'],\     'cs,java,javascript,d,vim,python,perl6,scala,vb,elixir,go' : ['.'],\     'ruby' : ['.', '::'],\     'lua' : ['.', ':']\ }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.