vim 安装YouCompleteMe 插件
来源:互联网 发布:淘宝网高档纱巾 编辑:程序博客网 时间:2024/05/22 11:02
原文链接:http://www.aisun.org/2017/10/vim+youcompleteme/
要安装YouCompleteMe ,vim须支持python。可以命令输入vim --version 查看, 如果python前有+号,就是支持,减号就是不支持。
如果不支持,需要以编译安装方式重新安装vim。
编译配置选项:
./configure --with-features=huge --enable-pythoninterp --enable-python3interp --enable-luainterp --enable-multibyte --enable-sniff --enable-fontset
安装vundle插件
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
在.vimrc中配置:
set nocompatible " be iMproved, requiredfiletype off " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/vundle/call vundle#rc()" alternatively, pass a path where Vundle should install plugins"let path = '~/some/path/here'"call vundle#rc(path)" let Vundle manage Vundle, requiredPlugin 'gmarik/vundle'" The following are examples of different formats supported." Keep Plugin commands between here and filetype plugin indent on." scripts on GitHub reposPlugin 'tpope/vim-fugitive'Plugin 'Lokaltog/vim-easymotion'Plugin 'tpope/vim-rails.git'" 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/'}" scripts from http://vim-scripts.org/vim/scripts.htmlPlugin 'L9'Plugin 'FuzzyFinder'" scripts not 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'" ...filetype plugin indent on " requiredBundle 'Valloric/YouCompleteMe'
保存退出,打开vim,输入 :BundleInstall 进行自动安装
+号表示已经安装,>表示正在安装;
在.vimrc 中添加:
let mapleader = "," " 这个leader就映射为逗号“,”
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py' “配置默认的ycm_extra_conf.py
nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR> “按,jd 会跳转到定义
let g:ycm_confirm_extra_conf=0 “打开vim时不再询问是否加载ycm_extra_conf.py配置
let g:ycm_collect_identifiers_from_tag_files = 1 "使用ctags生成的tags文件
重启vim之后出现需要更高版本的vim,需要先升级vim,
首先,要下载vim的源代码。
cd ~
git clone https://github.com/vim/vim.git
cd vim
进入源代码的src目录中,执行:
./configure --with-features=huge --enable-pythoninterp=yes --enable-cscope --enable-fontset --enable-perlinterp --enable-rubyinterp --with-python-config-dir=/usr/lib/python2.7/config --prefix=/usr/local
需要注意的是,不能写上--enable-gui,这是开启gui特性的,但是我们是在终端环境下安装的,因此不能开启这个特性,否则会出现编译错误。之后
cd ..
sudo make install
which vim
将src目录下编译好的vim执行文件替换上边which vim路径内的vim文件就升级ok了;
- 安装Vim插件 YouCompleteMe
- vim安装YouCompleteMe 插件
- vim youcompleteme插件安装
- vim 安装YouCompleteMe 插件
- 安装vim的YouCompleteMe插件
- Linux vim安装YouCompleteMe插件
- Ubuntu vim安装插件YouCompleteMe
- mac 安装vim 插件YouCompleteMe
- vim补全插件YouCompleteMe安装
- Vim智能补全插件YouCompleteMe安装
- vim补全插件YouCompleteMe安装
- vim补全插件YouCompleteMe安装
- vim 插件YouCompleteMe 简单安装使用
- Vim智能补全插件YouCompleteMe安装
- CentOs 7下vim安装YouCompleteMe插件
- ubuntu下为vim安装youcompleteme插件
- vim安装youcompleteme自动补全插件
- centos7下安装vim的YouCompleteMe插件
- 昂达平板电脑怎么进bios设置u盘为第一启动盘?
- 文书网vl5x值的计算
- underscore 常用的方法
- Linux 系统调用原理
- Source insight快捷键
- vim 安装YouCompleteMe 插件
- 嵌入式视频处理考虑(二)
- Redis分布式锁的简单实现分析
- leetcode 28
- spring cloud踩坑日志(4)- eureka初始配置
- 自定义View的圆圈进度条
- 表提示(Transact-SQL)
- HIVE
- cocos js-binding相关资料