zoukankan      html  css  js  c++  java
  • install vim8.0 and YouCompleteMe in Centos 7

    install dependency

    yum install -y gcc-c++ ncurses-devel python-devel cmake python36u-devel
    

    install vim

    git clone https://github.com/vim/vim.git /root/mtl/vim
    
    ./configure 
      --disable-nls 
      --enable-cscope 
      --enable-gui=no 
      --enable-multibyte  
      --enable-pythoninterp 
      --enable-rubyinterp 
      --prefix=/usr/local/vim 
      --with-features=huge  
      --with-python-config-dir=/usr/lib/python3.6/config 
      --with-tlib=ncurses 
      --without-x
    
    make && make install
    
    

    configure vim

    cp /etc/vimrc ~/.vimrc
    
    mv /bin/vim /bin/vim_bak
    ln /usr/local/vim/bin/vim vim
    
    then install Vundle
    

    install YouCompleteMe

    git clone https://github.com/Valloric/YouCompleteMe.git  ~/.vim/bundle/YouCompleteMe
    

    configure YouCompleteMe

    
    cd ~/.vim/bundle/YouCompleteMe && git submodule update --init --recursive && python3 install.py --all
    

    add YouCompleteMe to .vimrc

    install jedi-vim

    after install, then
    add content below to ~/.vimrc
    " ESTIMATE PYTHON VERSION, BASED ON THIS WE WILL SIMPLY CALL PY or PY3
    " this will decide what version of pyton VIM will load
    " note +python/dyn and +python3/dyn has to be loaded
    let py_version = system('python -V 2>&1 | grep -Po "(?<=Python )[2|3]"')
    if  py_version == 2
      python pass
    elseif py_version == 3
      python3 pass
    else
      python pass
    endif
    
    
  • 相关阅读:
    Python超简单的HTTP服务器
    浅析python的string.Template
    virtualenv python虚拟环境搭建
    python 爬虫-sohu抓小说
    python RE模块
    linux 修改系统时间
    Linux下查看文件和文件夹大小
    python os模块使用方法
    python文件操作 seek(),tell()
    python encode decode unicode区别及用法
  • 原文地址:https://www.cnblogs.com/otfsenter/p/8820728.html
Copyright © 2011-2022 走看看