在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位上安装同样的插件,才知道之前所做的安装原来是多么的简单.今 ...
随机推荐
- Python核心编程笔记 第三章
3.1 语句和语法 3.1.1 注释( # ) 3.1.2 继续( \ ) 一般使用换行分隔,也就是说一行一个语句.一行过长的语句可以使用反斜杠( \ ) 分 ...
- java项目部署常用linux命令
1.显示当前所有java进程pid的命令:jps2.查找文件或文件夹目录查找目录:find /(查找范围) -name '查找关键字' -type d查找文件:find /(查找范围) -name 查 ...
- 开发一个项目之npm
npm (nodejs平台上写的js模块的管理工具 下载.互相依赖等) npm install 本地项目的node_modules文件夹 , -g npm config prefix 目录eg: ...
- win10 64位Python 3.6.2 + Django 环境安装
一.安装Python3.6.2 1.下载安装包 https://www.python.org/downloads/release/python-362/ 2.一直下一步,记得到了这个界面全部勾选再下一 ...
- git的操作集合
一.git 操作 $ git branch -a //查看远程分支$ git branch //查看本地分支 $ git branch -d <BranchName>//删除本地分支$ g ...
- Spring框架-AOP详细学习[转载]
参考博客:https://blog.csdn.net/qq_22583741/article/details/79589910#4-%E4%BE%9D%E8%B5%96%E6%B3%A8%E5%85% ...
- 2018-2019 网络对抗技术 20165231 Exp5 MSF基础应用
实践内容(3.5分) 本实践目标是掌握metasploit的基本应用方式,重点常用的三种攻击方式的思路.具体需要完成: 1.1一个主动攻击实践(1分) ms08_067; (失败) MS17-010永 ...
- Date——js 获取当前日期到之后一个月30天的日期区间
var dateList = []; let startDate = new Date(); let endDate = new Date(); endDate.setDate(startDate.g ...
- WPF 10天修炼 第六天- 系统属性和常用控件
WPF系统属性和常用控件 渐变的背景色 WPF中的前景色和背景色不同于传统Winform的设置,这些属性都是Brush类型的值.在XAML中,当为这些属性设置指定的颜色后将被转换为SolidColor ...
- 从头开始学Maven【依赖范围】
例如 <dependencies> <dependency> <groupId></groupId> <artifactId></ar ...