Ubuntu 16.04 + vim8 + vundle + YouCompleteMe

简介:
+关注继续查看

【vim8】

1、卸载旧版 vim 。

1.1、查看

1
2
3
walker@ubuntu:~$ dpkg -l | grep vim
ii  vim-common                         2:7.4.1689-3ubuntu1.2             amd64        Vi IMproved - Common files
ii  vim-tiny                           2:7.4.1689-3ubuntu1.2             amd64        Vi IMproved - enhanced vi editor - compact version

1.2、卸载

1
sudo apt remove --purge  vim-common vim-tiny

2、安装依赖项。

1
sudo apt install gcc make libncurses5-dev git python-dev python3-dev

3、下载 vim 源码。

1
git clone --depth=1 https://github.com/vim/vim.git ~/vim8git

4、编译安装。

1
2
3
4
5
6
7
8
9
10
cd ~/vim8git/
./configure --with-features=huge \
            --enable-multibyte \
            --enable-cscope  \
            --enable-pythoninterp=yes \
            --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
            --enable-python3interp=yes \
            --with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu
make
sudo make install

5、检查。(+为支持,-为不支持)

1
2
3
walker@ubuntu:~/vim8git$ vim --version | grep python
+cryptv          +linebreak       +python/dyn      +vreplace
+cscope          +lispindent      +python3/dyn     +wildignore




YouCompleteMe

1、安装依赖项。

1
sudo apt install build-essential cmake clang

2、下载。

1
git clone --recursive https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe

如果出现异常,进入 ~/.vim/bundle/YouCompleteMe 目录,重复下面的命令直到下载完整。(不用vundle 自己下载 ycm 的原因也是因为这个包大而杂,容易出现异常。)

1
git submodule update --init --recursive

4、编译。

1
2
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer --system-libclang




vundle

1、下载。

1
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

2、将下面内容添加到 ~/.vimrc 的顶部。

1
2
3
4
5
6
7
8
9
10
11
12
set nocompatible              " be iMproved, required
filetype off                  " required
 
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
 
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
 
call vundle#end()            " required
filetype plugin indent on    " required
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'


*** walker ***

本文转自walker snapshot博客51CTO博客,原文链接http://blog.51cto.com/walkerqt/1935024如需转载请自行联系原作者


RQSLT

相关文章
|
3月前
|
人工智能 IDE Java
Linux之yum与vim的使用
Linux之yum与vim的使用
|
3月前
|
Linux 开发工具 Windows
Linux下的yum和vim
Linux下的yum和vim
|
6月前
|
人工智能 IDE Java
Linux之yum与vim
Linux中软件安装包(yum)与编辑器(vim)的使用
86 0
Linux之yum与vim
|
10月前
|
数据可视化 Linux Shell
|
Linux 开发工具
Centos7 下安装VIM编辑器
Centos7 下安装VIM编辑器
510 0
Centos7 下安装VIM编辑器
|
Ubuntu Linux 开发工具
相关产品
云迁移中心
推荐文章
更多