当前位置:   article > 正文

Windows下YouCompleteMe安装教程_windows安装youcompleteme

windows安装youcompleteme

简介

YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine for Vim.
参考: https://github.com/Valloric/YouCompleteMe#full-installation-guide
本篇文章默认读者知道什么是 unix/linux,vim/vi, YouCompleteMe,如果有不清楚的,Search engine is your friend 或者留言讨论。YouCompleteMe 简称 YCM 以下都称为 YCM

安装步骤:

1. 确保 vim 版本是 7.4.143 或以上,并且支持 python 2/3 脚本

输入vim –version
这里写图片描述
在 vim 中键入命令 :echo has(‘python’) || has(‘python3’),若结果是 1 则证明是支持的。

2. 通过 Vundle 来安装 YCM(官方推荐)

在 vim 的配置文件 ~/.vimrc 中添加一行(在call vundle#begin() 和 call vundle#end() 之间)

call vundle#begin()
. . . 
Plugin 'Valloric/YouCompleteMe’
. . .
call vundle#end()
  • 1
  • 2
  • 3
  • 4
  • 5

然后保存运行 vim 命令 :PluginInstall 安装 需要特别注意的是这个时候可能等的时间会相当的长

~/.vimrc添加以下内容

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

Plugin 'VundleVim/Vundle.vim'

Plugin 'tpope/vim-fugitive'
Plugin 'Valloric/YouCompleteMe'

Plugin 'git://git.wincent.com/command-t.git'

Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26

3.安装完成YCM

> 安装完成后基本上可以使用但当前不支持C、JavaScript、Go等语言的语义补全
  • 1

4.下载cmake

下载cmake用于构建具体添加方法参见
https://github.com/Valloric/YouCompleteMe

5.参考链接:http://www.jianshu.com/p/d908ce81017a?nomobile=yes

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/353094
推荐阅读
相关标签
  

闽ICP备14008679号