在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, requiredfiletype off                  " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" alternatively, pass a path where Vundle should install plugins"call vundle#begin('~/some/path/here')" let Vundle manage Vundle, requiredPlugin 'VundleVim/Vundle.vim'" The following are examples of different formats supported." Keep Plugin commands between vundle#begin/end." plugin on GitHub repoPlugin 'tpope/vim-fugitive'" plugin from http://vim-scripts.org/vim/scripts.html" Plugin 'L9'" Git plugin not hosted on GitHubPlugin '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 linecall vundle#end()            " requiredfiletype 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'" YouCompleteMeset runtimepath+=~/.vim/bundle/YouCompleteMelet g:ycm_collect_identifiers_from_tags_files = 1           " 开启 YCM 基于标签引擎let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释与字符串中的内容也用于补全let g:syntastic_ignore_files=[".*\.py$"]let g:ycm_seed_identifiers_with_syntax = 1                  " 语法关键字补全let g:ycm_complete_in_comments = 1let g:ycm_confirm_extra_conf = 0let 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 = 1                          " 在注释输入中也能补全let g:ycm_complete_in_strings = 1                           " 在字符串输入中也能补全let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释和字符串中的文字也会被收入补全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 = 0                           " 禁用语法检查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+)

解决办法:编译安装vim8.0,添加python支持

 

网址:在deepin上安装YouCompleteMe

转载于:https://www.cnblogs.com/wmjtxt/p/9040969.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/280324.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2015年IT领域里Docker和其它颠覆性的趋势

本文讲的是2015年IT领域里Docker和其它颠覆性的趋势&#xff0c;【编者的话】文中作者介绍了2015年IT领域的一些颠覆性的趋势&#xff0c;比如Docker将如何革新PaaS、IaaS等&#xff0c;Docker将如何颠覆虚拟化、私有云、配置管理。 2014年真是令人兴奋的一年&#xff0c;这一年…

进化:从孤胆极客到高效团队_极客狂:为什么这么多的网站无法使用打印样式表?...

进化:从孤胆极客到高效团队It never ceases to amaze me that people have to look for a link or a button that says “Print” on a web page, especially considering there’s a miracle technology that makes that step unnecessary. Sadly almost nobody uses it, even…

Iterator 和 for...of 循环

Iterator 和 for...of 循环 Iterator&#xff08;遍历器&#xff09;意义 为Array、Object、Map、Set四种数据集合&#xff0c;提供统一的接口机制来处理所有不同的数据结构 。 任何数据结构&#xff0c;只要部署 Iterator 接口&#xff0c;就可以完成遍历操作&#xff08;即依…

python简单开发接口

1、首先需要安装flask这个模块&#xff1a;pip install flask。flask是个轻量级的接口开发框架2、开发接口有什么作用  1、mock接口&#xff0c;模拟一些接口&#xff0c;在别的接口没有开发好的时候&#xff0c;需要用mock去模拟一些接口。  2、知道接口是怎么开发的&…

九哥聊Kestrel网络编程第二章:开发一个Fiddler

推荐序之前在.NET 性能优化群内交流时&#xff0c;我们发现很多朋友对于高性能网络框架有需求&#xff0c;需要创建自己的消息服务器、游戏服务器或者物联网网关。但是大多数小伙伴只知道 DotNetty&#xff0c;虽然 DotNetty 是一个非常优秀的网络框架&#xff0c;广泛应用于各…

apple tv 开发_如何跨多台Apple TV同步Apple TV的主屏幕

apple tv 开发If you have more than one Apple TV in your household, you probably know how annoying it is when you have to install Apple TV apps multiple times on each device. However, with the release of tvOS 11, that’s no longer the case. 如果您的家庭中有…

这些故事说的都是你——译者带你读《硅谷革命》

作者 | 薛命灯 作为《硅谷革命》的译者之一&#xff0c;同时也是一个拥有十余年软件开发和架构经验的工程师&#xff0c;当时我在决定是否接受重译这本书的时候&#xff0c;几乎是不假思索地答应了郭蕾&#xff08;本书重启版发起人之一&#xff09;的提议&#xff0c;只因他的…

runc容器逃逸漏洞最强后续:应对之策汇总与热点疑问解答

美国时间2019年2月11日晚&#xff0c;runc通过oss-security邮件列表披露了runc容器逃逸漏洞CVE-2019-5736的详情。runc是Docker、CRI-O、Containerd、Kubernetes等底层的容器运行时&#xff0c;此次安全漏洞无可避免地会影响大多数Docker与Kubernetes用户&#xff0c;也因此为整…

OOD之问题空间到解空间—附FP的建模

通常会被问到&#xff0c;什么事OOD&#xff0c;然后大部分人期待的答案比较死板&#xff0c;继承、封装、多态&#xff01;懂这个的人多的去了&#xff0c;有什么好问&#xff1f;回答出来的人是否拿着Java又去做一些面向过程的勾当&#xff1f; 计算机革命起源于机器&#xf…

com surrogate_什么是“ COM Surrogate”(dllhost.exe),为什么它在我的PC上运行?

com surrogateIf you poke around in your Task Manager, there’s a good chance you’ll see one or more “COM Surrogate” processes running on a Windows PC. These processes have the file name “dllhost.exe”, and are part of the Windows operating system. You’…

云计算时代,互联网金融背后的想象空间

本文讲的是云计算时代&#xff0c;互联网金融背后的想象空间&#xff0c;【IT168评论】阿里巴巴在纽交所的开市钟史无前例的由八位合作伙伴敲响&#xff0c;可见阿里对互联网时代构筑起生态系统的坚持。这其中&#xff0c;由余额宝所敲开的互联网金融热潮的热度持续不减&#x…

JavaScript数据结构与算法——集合

1.集合数据结构 集合是一组无序且唯一&#xff08;不能重复&#xff09;的项组成的。这个数据结构使用了和有限集合相同的数学概念。 2.创建集合 function Set() {// 这里使用对象而不是数组来表示集合 // js对象中不允许一个键值指向两个不同属性&#xff0c;也保证了集合中的…

php用两个栈来实现队列

php用两个栈来实现队列 一、总结 我主要的问题是不知道的是题目描述&#xff0c;题目和贵的代码之间的关系&#xff0c;以及返回值 思路&#xff1a;A栈做入队操作&#xff0c;B栈做出队操作&#xff0c;入队的时候元素直接入A&#xff0c;出队的时候判断B栈是否为空&#xff0…

facebook 邀请好友_如何查看紧急情况下您的Facebook朋友是否安全

facebook 邀请好友Facebook’s Safety Check feature lets you check in during an emergency to confirm you’re safe. If you have friends or family in an area that you haven’t heard from, though, you may want to ask them directly. Here’s how to ask someone to…

【您有一封来自阿里云的邀请函】阿里云成都客户服务中心20+职位虚席以待,来吧,成就最好的自己!...

如果你不想辜负这个科技的时代&#xff0c;相信它会因你而不同。如果你不想仅做年度大戏的观众&#xff0c;相信自己会成为主角。如果你不想淹没在枯燥与苟且中&#xff0c;相信工作有诗和远方。那么&#xff0c;不要犹豫&#xff0c;加入我们&#xff01;在这&#xff0c;你已…

A - A Secret -扩展KMP

题目大意&#xff1a;给你两个字符串A,B&#xff0c;现在要你求B串的后缀在A串中出现的次数和后缀长度的乘积和为多少。题解&#xff1a;扩展KMP模板题&#xff0c;将A和B串都逆序以后就变成了求前缀的问题了&#xff0c;扩展KMP求处从i位置开始的最长公共前缀存于数组。最后通…

.NET 代码优化 聊聊逻辑圈复杂度

本文属于 dotnet 代码优化系列博客。相信大家都对圈复杂度这个概念很是熟悉&#xff0c;本文来和大家聊聊逻辑的圈复杂度。代码优化里面&#xff0c;一个关注的重点在于代码的逻辑复杂度。一段代码的逻辑复杂度越高&#xff0c;那么维护起来的难度也就越大。衡量代码的逻辑复杂…

GO语言基础条件、跳转、Array和Slice

1. 判断语句if 1. 条件表达式没有括号&#xff08;这点其他语言转过来的需要注意&#xff09; 2. 支持一个初始化表达式&#xff08;可以是并行方式&#xff0c;即&#xff1a;a, b, c : 1, 2, 3) 3. 左大括号必须和条件语句或 else 在同一行 4. 支持单行模式 5. 初始化语句中的…

干式真空泵原理_如何安装干式墙锚在墙壁上悬挂重物

干式真空泵原理If you ever plan to mount something to the wall that’s even remotely heavy, you’ll need to use drywall anchors if a stud isn’t available. Here are the different types of drywall anchors, and how to use each one. 如果您打算将甚至更重的东西安…

sharding-jdbc学习

sharding-jdbc的全局id生成策略是通过雪花算法来实现的。 sharding-jdbc也是一个数据的中间件&#xff0c;可实现读写分离和分库分表&#xff0c;比mycat要简单些。 nginx与ribbon实现负载均衡的区别&#xff1a;nginx是实现服务器端的负载均衡&#xff0c;ribbon是实现客户端即…