Cenos7 安装Vundle+YoucompleteMe

1.检查系统版本、软件版本
    cat /etc/centos-release
        CentOS Linux release 7.0.1406 (Core)
2.检查gcc、cmake、clang、llvm、llvm-libs、python、python-devel、get-pip.py版本
    
    可能需要更改yum源,操作方法见:
    
    yum install wget
    yum groupinstall "Development Tools"
    
    rpm -qa | grep python
    rpm -qa | grep python-devel
    yum install python-devel
    git --version
    # cmake --version
        cmake version 2.8.12.2
    
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python get-pip.py
        
安装 vim 7.4 以上的版本
    
    yum install ncurses-devel.x86_64  

    ./configure --with-features=huge --enable-multibyte --with-python-config-dir=/usr/lib64/python2.7/config/ --enable-pythoninterp=yes --enable-luainterp --enable-gui --enable-cscope --enable-multibyte --prefix=/usr/local/vim8
    
    make
    make install   
    
    
    //--enable-python3interp=yes \  注释
    //--with-python3-config-dir=/usr/local/python-3.5.3/lib/python3.5/config-3.5m \ 注释
    
    鼠标右键粘贴
    vim /usr/local/share/vim/vim80/defaults.vim
    
    问题:
    假如出现了no terminal library found:
        yum install libncurses5-dev
    
    更改CentOS 6.6的默认
        # ln -s /usr/local/vim8/bin/vim /usr/bin/vim
        
    添加至PATH环境变量:
        # vim /etc/profile.d/vim.sh
            export PATH=/usr/local/vim8/bin:$PATH
        # echo $PATH
    
安装Vundle插件管理器
    git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
    cd ~
    vim .vimrc    
        filetype off " required
        set rtp+=~/.vim/bundle/Vundle.vim
        call vundle#begin()
        Plugin 'VundleVim/Vundle.vim'
        Plugin 'Valloric/YouCompleteMe'

        call vundle#end()            
        filetype plugin indent on    
        filetype off " required

    vim +PluginInstall +qall
    cd ~/.vim/bundle/YouCompleteMe
    ./install.py --all
    
    vim .vimrc
    "****************YoucompleteMe set *******************************
        let g:ycm_server_python_interpreter='/usr/bin/python'
        let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
    "****************YoucompleteMe set *******************************

    
    Vundle使用方法:
        :PluginList       - lists configured plugins
        :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
        :PluginSearch foo - searches for foo; append `!` to refresh local cache
        :PluginClean

猜你喜欢

转载自blog.csdn.net/tan88881111/article/details/80131784