CentOS YCM 설치 방법

2228 단어
1. vundle 설치
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

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

3、vim 실행 열기
:BundleInstall

4. 필요한 도구 설치
1. yum install gcc-c++ make automake python-devel 2, CMake 설치
wget http://www.cmake.org/cmake/resources/software.html 
tar -zxv -f cmake-*.*.*.*.tar.gz 
cd cmake-*.*.*.*.tar.gz 
./bootstrap 
gmake 
gmake install

5,clang+llvm를 설치합니다.
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               :

PATH=/usr/local/cmake/bin:/usr/clang_3_3/bin:$PATH
export PATH

3、      :source /etc/profile

6、YCM 디렉터리에 들어가서 실행
./install.sh –clang-completer

7、맞아요~/.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 = 0

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

좋은 웹페이지 즐겨찾기