zoukankan      html  css  js  c++  java
  • gvim 安装YouCompleteMe插件

    可以参考:YouCompleteMe#full-installation-guide

    可以直接下载:

    http://pan.baidu.com/s/1dDIq2Al 密码: si5q

    确保vim支持python

    1. 去vim官网下载7.4以上的gvim版本。

    2. 去官网下载python2.7

    3. 把python的路径添加到环境变量里,主要是 xxxPython27libs 这个路径添加进去。

    4. 检验方法,在vim里输入下面指令,如果返回1说明没问题,否则就是环境路径没有设置正确。

    :echo has('python') || has('python3')

    不是1就不用往下看了。

    安装git 及 Vundle

    1. 去git官网下载并安装git。

    2. 使用git下载vundle。(对于windows, 在我的电脑上, ~代表C:UsersAdministrator)

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

    3. 修改vim的vimrc文件,windows下是_vimrc文件,在最顶上添加:

    set nocompatible              " be iMproved, required
    filetype off                  " required
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    Plugin 'VundleVim/Vundle.vim'
    call vundle#end()            " required
    filetype plugin indent on    " required

    4. 进入vim,输入下面命令,自此,vundle安装完成。

    :PluginInstall

    安装YCM插件

    1. 使用git下载插件:

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

    2. 然后进行下面操作:

    cd ~/.vim/bundle/YouCompleteMe
    git submodule update --init --recursive

    3. 修改vim的_vimrc文件,在Plugin 'VundleVim/Vundle.vim'后添加:Plugin 'Valloric/YouCompleteMe',最后的内容像这样:

    set nocompatible              " be iMproved, required
    filetype off                  " required
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    Plugin 'VundleVim/Vundle.vim'
    Plugin 'Valloric/YouCompleteMe'
    call vundle#end()            " required
    filetype plugin indent on    " required

    4. 进入vim,输入下面命令,自此,YMC安装完成。

    :PluginInstall

    这时,打开一个文件,会提示错误,这是因为还没有做完。

    编译 ycm_core 库

    1. 下载安装Cmake

    2. 安装Visual Studio,免费社区版即可。

    3. 新建一个文件夹 ycm_build

    cd ~
    mkdir ycm_build
    cd ycm_build

     4. 开始编译, 下面的12根据你的安装版本,32位的把win64删掉

    cmake -G "Visual Studio 12 Win64" . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp

     如果编译不成功,那么就使用cmake的ui一个个的试

    
    
    
  • 相关阅读:
    android学习---Gallery画廊视图
    王立平--查看SQLite中的数据信息
    java中CyclicBarrier简单入门使用
    [ExtJS5学习笔记]第三十三节 sencha extjs 5 grid表格导出excel
    使用target打开的iframe 获取src的问题
    读《暗时间》的思考
    hdfs
    编译最新的SQLite 3.8.4.3为一个DLL
    使用Highcharts生成折线图_at last
    CentOS7 安装EFK(elasticsearch、fluent、kibana)进行Docker下日志搜集
  • 原文地址:https://www.cnblogs.com/qiyuexin/p/6474429.html
Copyright © 2011-2022 走看看