在deepin上安装YouCompleteMe
详细安装步骤在github上有,https://github.com/Valloric/YouCompleteMe,我这里是自己总结的简化版安装步骤。
步骤1.安装Vundle
首先,clone到本地
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim- 把以下内容复制到.vimrc:
set nocompatible " be iMproved, required
filetype off " required " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim' " The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'} " All of your Plugins must be added before the following line
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
- Install Plugins: 打开vim执行
:PluginInstall或者直接输入命令sudo vim +PluginInstall +qall
步骤2.安装工具和cmake
sudo apt-get install build-essential cmake
步骤3.安装python-dev,python3-dev
sudo apt-get install python-dev python3-dev
步骤4.安装clang
sudo apt-get install clang
步骤5.编译
cd ~/.vim/bundle/YouCompleteMe./install.py --clang-completer- 如果编译出错执行:
git submodule update --init --recursive
步骤6.复制以下内容到.vimrc中
"----------------------------"
"------ YouCompleteMe -------"
"----------------------------"
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py' " YouCompleteMe
set runtimepath+=~/.vim/bundle/YouCompleteMe
let g:ycm_collect_identifiers_from_tags_files = " 开启 YCM 基于标签引擎
let g:ycm_collect_identifiers_from_comments_and_strings = " 注释与字符串中的内容也用于补全
let g:syntastic_ignore_files=[".*\.py$"]
let g:ycm_seed_identifiers_with_syntax = " 语法关键字补全
let g:ycm_complete_in_comments =
let g:ycm_confirm_extra_conf =
let g:ycm_key_list_select_completion = ['<c-n>', '<Down>'] " 映射按键, 没有这个会拦截掉tab, 导致其他插件的tab不能用.
let g:ycm_key_list_previous_completion = ['<c-p>', '<Up>']
let g:ycm_complete_in_comments = " 在注释输入中也能补全
let g:ycm_complete_in_strings = " 在字符串输入中也能补全
let g:ycm_collect_identifiers_from_comments_and_strings = " 注释和字符串中的文字也会被收入补全
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_show_diagnostics_ui = " 禁用语法检查
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" | " 回车即选中当前项
nnoremap <c-j> :YcmCompleter GoToDefinitionElseDeclaration<CR>| " 跳转到定义处
"let g:ycm_min_num_of_chars_for_completion=2 " 从第2个键入字符就开始罗列匹配项
步骤7.出现的错误
我安装完以后,出现了以下错误:
YouCompleteMe unavailable: requires Vim compiled with Python (2.6+ or 3.3+)
在deepin上安装YouCompleteMe的更多相关文章
- Mac Yosemite上安装macvim和YouCompleteMe
今天在macvim上安装YouCompleteMe的时候,碰到一个运行vim崩溃的错误.查了半天终于解决! 先上一下安装macvim的过程 # install xcode and command li ...
- windows7 Cygwin 下安装 YouCompleteMe 插件
原创文章,欢迎指正!转载请注明~ 从上周就开始想在cygwin上安装YouCompleteMe插件,按照GITHUB上的官方教程安装,由于自己的理解失误,一直搞不清是按照在windows上安装还是按照 ...
- Ubuntu下如何安装YouCompleteMe插件
Ubuntu安装YouCompleteMe插件 简介: 众所周知, Vim是一款linux下的文本编辑器, 其最基础的工作就是编辑文本,而不管该文本的内容是什么. 在Vim被程序员所使用后,其慢慢的被 ...
- centos安装youcompleteme
哈哈,我又回来了,简单的重新装了一边虚拟机,又把vim配置了一遍,这回有信心把youcomplete的安装方法贴出来了,先给个权威的链接,然后给出具体步骤,保证没问题可以安装成功 http://www ...
- vim安装YouCompleteMe 插件
要安装YouCompleteMe ,vim须支持python.看是否支持,可以在vim中:version 查看, 如果python前有+号,就是支持,减号就是不支持. 如果不支持,需要以编译安装方式重 ...
- Deepin Linux 安装JDK
最近在自己的笔记本上安装了Deepin Linux,虽然使用过程中发现一些bugs,但是总体感觉还不错,准备把她作为开发系统使用.系统自带的JDK是Open JDK,但是在做JAVA开发的时候通常需要 ...
- 在ubuntu上安装k-vim
在ubuntu 上安装k-vim 早就想好好改造一下自己使用的vim了!可惜各种配置都十分复杂,特别是涉及到C语言的语义补全,YouCompleteMe,总是出各种安装问题.今天有人推荐我使用k-vi ...
- 给vim安装YouCompleteMe
要安装YouCompleteMe ,vim须支持python.看是否支持,可以在vim中:version 查看, 如果python前有+号,就是支持,减号就是不支持. 如果不支持,需要以编译安装方式重 ...
- Ubuntu14.04 32位安装Youcompleteme
前一段时间在ubuntu16.04 64位上安装了vim插件Youcompleteme,花了两三天才弄好.今天在ubuntu14.04 32位上安装同样的插件,才知道之前所做的安装原来是多么的简单.今 ...
随机推荐
- flex弹性盒子的使用
前言:这是笔者学习之后自己的理解与整理.如果有错误或者疑问的地方,请大家指正,我会持续更新! CSS3引入了一种新的布局模型—— flex 布局.flex是 flexible box 的缩写,一般称之 ...
- 第31月第25天 xcode debug 限制uitextfiled输入
1.xcode debug 了解了每个设置的意思,个人觉得对于一个普通的app来说可以这样配置这些设置: Generate Debug Symbols:DEBUG和RELEASE下均设为YES(和Xc ...
- Java多线程访问共享资源类及类之间关系设计
1.涉及的类 多线程类.共享资源存储类 2.类之间的关系 (1)共享资源存储类作为线程类的全局成员变量,在线程初始化时,通过setter或者构造注入(当然此处是同一个共享资源类对象),实现多个线程共享 ...
- shiro教程
ref https://www.jianshu.com/p/5a35d0100a71 https://www.jianshu.com/p/0366a1675bb6 https://blog.csdn. ...
- SpringMVC-简单总结
要学习一项技术,首先要知道, 它是什么, 为什么要用它 , 它由哪些东西组成, 每个东西是干什么的, 它们怎么综合在一起的 参考博客: 平凡希: https://www.cnblogs.com/xia ...
- FATAL ERROR: please install the following Perl modules before executing
运行安装mysql 报错 [root@localhost mysql-mult]# ./scripts/mysql_install_db --defaults-file=conf/3306my.cn ...
- mac配置go使用gopm下载第三方包
打开zshrc文件 vim ~/.zshrc 输入变量 export GOPATH="/Users/chennan/go" #这个自定义 export GOBIN=$GOPATH/ ...
- [SDOI2009]HH的项链-树状数组/线段树
树状数组: #include<bits/stdc++.h> using namespace std; ; int id[maxn],tree[maxn],vis[maxn],num[max ...
- Python——字符串
p ython——字符串 ①加法 连接两个字符串 ②乘法 复制字符串 python——转义字符 \n 换行 \' 单引号 \'' 双引号 \\ 反斜杠 raw字符串:无视转义字符 转义: 字符串 ...
- 高可用Redis(八):Redis主从复制
1.Redis复制的原理和优化 1.1 Redis单机的问题 1.1.1 机器故障 在一台服务器上部署一个Redis节点,如果机器发生主板损坏,硬盘损坏等问题,不能在短时间修复完成,就不能处理Redi ...